I've noticed that xmalloc does not zero out the memory that's just been allocated. This doesn't jive well when adding new fields to existing structures (specially these structures don't have a common constructor-type function to initialize the memory). What winds up happening is that these fields contain garbage. This is fine when these fields aren't used, but when these fields are pointers, they are always used by the function that frees the memory causing a core dump. For safety, I propose that xmalloc zero out the memory it allocates. Any comments or rebuttals? Noel
- Re: 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
