[EMAIL PROTECTED] on 05/02/2000 03:13:34 PM >i agree in principle ;). It probably would be better to >use calloc, within the xmalloc call( as that calloc will zero >out the memory for you ), then malloc. Larry's convinced me otherwise. IMHO, the "right" way to fix the problem is to have constructor-like functions to initialize the memory. This would always guarantee that the memory is initialized properly (given that anyone who changes the structure also changes the constructor -- but at least it'd be easier to see what needs to be changed). >Although looking at the xmalloc call, I don't know if it's such >a good thing for it to take a 0 length request and turn it into >a 1 byte request. Why would we need to ask for a 0 length portion >of memory? 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. Noel
- question (preference?) about xmalloc Noel L Yap
- Re: question (preference?) about xmalloc Larry Jones
- 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 xma... Donald Sharp
- Re: question (preference?) abou... 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