Noel L Yap writes: > > I was looking at that, too. I tend to feel that 0-byte allocations should be > allowed (returning NULL) and, if systems' frees don't handle NULL properly, > there should be an xfree() that'll do so. The problem with that is that code that calls malloc almost always assumes that a NULL return means there's no more memory available and thus errors out. Interpreting 0-byte requests as 1-byte requests ensures that you don't get a NULL return unless you really are out of memory and, as an extra added attraction, you don't have to wrap free. -Larry Jones It's not denial. I'm just very selective about the reality I accept. -- Calvin
- Re: question (preference?) about xmalloc Donald Sharp
- Re: question (preference?) about xmalloc Russ Allbery
- Re: question (preference?) about xmalloc Michael Gersten
- Re: question (preference?) about xmalloc Greg A. Woods
- Re: question (preference?) about xmalloc David Thornley
- Re: question (preference?) about xmalloc Derek Scherger
- Re: question (preference?) about xmalloc Jonathan M. Gilligan
- Re: question (preference?) about xmalloc David Thornley
- Re: question (preference?) about xmalloc Noel L Yap
- Re: question (preference?) about xmalloc Donald Sharp
- Re: question (preference?) about xmalloc Larry Jones
- Re: question (preference?) about xmalloc Noel L Yap
- Re: question (preference?) about xmalloc Donald Sharp
- Re: question (preference?) about xmalloc Larry Jones
- Re: question (preference?) about xmalloc Donald Sharp
- Re: question (preference?) about xma... Larry Jones
- Re: question (preference?) about xmalloc Noel L Yap
- RE: question (preference?) about xmalloc Leeuw, Guus (G.)
- Re: question (preference?) about xmalloc Paul Sander
- Re: question (preference?) about xmalloc Paul Sander
- Re: question (preference?) about xmalloc Noel L Yap
