sbrk(2) broken

Poul-Henning Kamp phk at
Mon Jan 7 01:08:39 PST 2008

In message <20080104134829.GA57756 at>, Kostik Belousov 

>On Fri, Jan 04, 2008 at 02:12:50PM +0100, Dag-Erling Sm??rgrav wrote:
>> "Igor Mozolevsky" <igor at> writes:
>> > This makes memory management in the userland hideously and
>> > unnecessarily complicated. It's simpler to have SIGDANGER [...]
>> You don't seem to understand what Poul-Henning was trying to point out,
>> which is that broadcasting SIGDANGER can make a bad situation much, much
>> worse by waking up and paging in every single process in the system,
>By making the default action for SIGDANGER to be SIG_IGN, this problem
>would be mostly solved. Only processes that actually care about SIGDANGER
>and installing the handler for it would require some non-trivial and
>resource-hungry operation.

This is a non-starter, if SIGDANGER is to have any effect, all
processes that use malloc(3) should react to it.

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

More information about the freebsd-current mailing list