[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memset (0, 0, 0);
From: |
Wolfram Gloger |
Subject: |
Re: memset (0, 0, 0); |
Date: |
Mon, 7 Apr 2003 11:44:21 +0200 (MDT) |
Hi,
> On the 1st time of calling, none of the gdbarch stuff is set up, so NUM_REGS
> = NUM_PSEUDO_REGS = 0. So xmalloc gets called with size=0. That returns 0 as
> the 'address', which gets passed to memset. I guess this just works OK on
> other architectures (it does on x86 anyway).
Actually on x86-linux, malloc(0) (and therefore xmalloc(0)) returns a
unique address, not NULL. Both behaviours are permitted by standard
C.
Regards,
Wolfram.
- memset (0, 0, 0);, Joern Rennecke, 2003/04/04
- Re: memset (0, 0, 0);, Daniel Jacobowitz, 2003/04/04
- Re: memset (0, 0, 0);, Andrew Cagney, 2003/04/04
- Re: memset (0, 0, 0);, Andreas Schwab, 2003/04/04
- Re: memset (0, 0, 0);, Petr Vandrovec, 2003/04/04
- RE: memset (0, 0, 0);, Thomas,Stephen, 2003/04/07
- Re: memset (0, 0, 0);,
Wolfram Gloger <=
- Re: memset (0, 0, 0);, Daniel Jacobowitz, 2003/04/07
- Re: memset (0, 0, 0);, Geoff Keating, 2003/04/07
- RE: memset (0, 0, 0);, Thomas,Stephen, 2003/04/07
- RE: memset (0, 0, 0);, Thomas,Stephen, 2003/04/08