In the last episode (Jul 19), Dag-Erling Smorgrav said:
> "Kelly Yancey" <[EMAIL PROTECTED]> writes:
> > Ahh...but wouldn't the bzero() touch all of the memory just
> > allocated functionally making it non-overcommit?
>
> No. If it were an "non-overcomitting malloc", it would return NULL
> and set errno to ENOMEM, instead of dumping core.
It should be possible to modify calloc to trap signals, then bzero. If
bzero faults, you free the memory and return NULL.
No, wait. You can't trap SIGKILL. How about this. mmap() some
anonymous memory MAP_SHARED, fork a child to bzero it. If the child
dies, unmmap and return NULL. If the child succeeds, use the memory.
This memory won't be freeable with malloc(), though.
-Dan Nelson
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message