sbrk(2) broken

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Jan 7 05:18:50 PST 2008


In message <a2b6592c0801070515g37735475kc0922af8f93723ca at mail.gmail.com>, "Igor
 Mozolevsky" writes:
>On 07/01/2008, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
>> In message <20080107095853.GR947 at server.vk2pj.dyndns.org>, Peter Jeremy writes:
>>
>> >>This is a non-starter, if SIGDANGER is to have any effect, all
>> >>processes that use malloc(3) should react to it.
>> >
>> >This depends on what SIGDANGER is supposed to indicate.  IMO, a single
>> >signal is inadequate - you need a "free memory is less than desirable,
>> >please reduce memory use if possible" and one (or maybe several levels
>> >of) "memory is really short, if you're not important, please die".
>>
>> That's what I have been advocating for the last 10 years...
>
>That makes the userland side of unnecessarily overcomplicated.

Yes, but you will not see this complication, it will be hidden
in the implementation of malloc(3).

Every problem has a simple, easy to understand solution that does
not work.  SIGDANGER is one of these.  It didn't work any good on
AIX and it won't do so on FreeBSD either.

The problem simply requires more than one bit of feedback information
to get a sensible regulation.

-- 
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