Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 1999 20:40:38 -0400 (EDT)
From:      Brian Dean <brdean@unx.sas.com>
To:        mi@aldan.algebra.com
Cc:        current@FreeBSD.ORG
Subject:   Re: swap-related problems
Message-ID:  <199904150040.UAA30248@dean.pc.sas.com>
In-Reply-To: <199904142340.TAA96857@misha.cisco.com> from Mikhail Teterin at "Apr 14, 1999  7:40: 7 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

> 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					brdean@unx.sas.com


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904150040.UAA30248>