malloc() behavior (was: Pointer please)

Robert Huff roberthuff at rcn.com
Sun Oct 5 20:20:46 PDT 2003


Dan Nelson writes:

>  Could be one of two problems.  The program either malloced memory
>  and tried to use it without zeroing it, or it freed some memory
>  and tried to keep using it.  In -current, the malloc has the J
>  debugging flag set, which fills malloced and freed memory with
>  0xd0 (see the malloc manpage).

	On that page (on my 5.1 system), it says malloc() does not zero
allocated pages.  Is this a change (possibly just for CURRENT), and
if so since when?  Bexause unless I'm delusional (possible) I
thought pages /were/ supposed to be zeroed, and doing so was one of the
system's "as time permits" chores.


					Robert Huff


	



More information about the freebsd-questions mailing list