> I do not see how they can guarantee the usability of the returned
> memory with the current kernel. There apparently is no way of
> knowing at malloc time if the memory can be used. Worse then that,
> it may be possible to use it at malloc time, but unless your program
> runs and touches every page, the memory may not be available later.

Check the man page (and the source).  It looks as if "export
MALLOC_OPTIONS=Z" will cause malloc to touch every page and zero it
out.  This may be in part what you are wanting.  Also, you can compile
in malloc_options = "Z" to acheive the same affect without having to
always export the environment variable.

Of course, when you do this, your process will (might) still be killed
immediately or at some point in the future, which I think is what you
are trying to avoid :(

-Brian
--
Brian Dean                                      brd...@unx.sas.com


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to