Peter Seebach wrote:
>
> In message <[EMAIL PROTECTED]>, Dag-Erling Smorgrav writes:
> >This is all academic since FreeBSD does memory overcommit, so unless
> >you run out of address space for your process before you run out of
> >actual memory and/or swap (not likely, but quite possible) malloc()
> >will never return NULL and you won't know a thing until you dirty one
> >page too many and segfault.
>
> Is there any hope that, some day, a setting could be provided where a program
> could request that malloc *NOT* overcommit? There are programs which would
> rather know in advance, and clean up, than be killed abruptly.
>
to not be caught by surprise,
simply touch every page after you allocate it.
> (To be pedantic, this is a conformance issue. If the memory isn't actually
> allocated, malloc shouldn't be returning a non-null pointer.)
>
> -s
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
--
__--_|\ Julian Elischer
/ \ [EMAIL PROTECTED]
( OZ ) World tour 2000-2001
---> X_.---._/
v
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message