In message <[EMAIL PROTECTED]>, Archie Cobbs writes:
>Here's an idea for a new /etc/malloc.conf option to help with
>debugging... I'm interested in what other people think.
>
>The option would have the effect of setting a "failure probability"
>P between 0.0 and 1.0 such that any malloc()/realloc() operation would
>fail with probability P.

It's a good idea, but it needs improvement.  If malloc() fails with
a finite probability you will never get to test the end-game for most
processes.

Ideally you would give malloc a flag to say 'L'ook for failure, and
some covert channel would be dug through which you can control the
probability in batch or realtime mode.

Either way, I'm not sure it belongs in phkmalloc()

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to