John Macdonald writes: > > But if no memory is actually allocated, how do you ensure that the > address of the zero-length chunk is different? Since it didn't use > any memory, the same memory address is still free and is likely to be > returned as the result of the next allocation request too. The ANSI/ISO C standards do not allow that behavior. If malloc(0) does not return a null pointer, it is required to return a unique address like it does for non-zero requests. -Larry Jones Please tell me I'm adopted. -- Calvin
- Re: question (preference?) about xmalloc Paul Sander
- Re: question (preference?) about xmalloc Paul Sander
- Re: question (preference?) about xmalloc Noel L Yap
- Re: question (preference?) about xmalloc Noel L Yap
- Re: question (preference?) about xmalloc Larry Jones
- Re: question (preference?) about xmalloc Greg A. Woods
- Re: question (preference?) about xmalloc Noel L Yap
- Re: question (preference?) about xmalloc Noel L Yap
- Re: question (preference?) about xmalloc Paul Sander
- Re: question (preference?) about xmalloc John Macdonald
- RE: question (preference?) about xmalloc Larry Jones
- RE: question (preference?) about xmalloc Cameron, Steve
- Re: question (preference?) about xmalloc Paul Sander
- Re: question (preference?) about xmalloc John Macdonald