sbrk(2) broken

Igor Mozolevsky igor at
Fri Jan 4 05:03:04 PST 2008

On 04/01/2008, Poul-Henning Kamp <phk at> wrote:

> SIGDANGER is not what we need.
> What we need is an intelligent mechanism to tell applications what
> the overall situation is, so that jemalloc and aware applications can
> tune their usage pattern to the availability of physical and virtual
> memory.
> Instead of the binary "SIGDANGER" indication we need a more gradual
> state, at the very least three stats:  "plenty", "getting a bit
> tight" and "crunchtime".

This makes memory management in the userland hideously and
unnecessarily complicated. It's simpler to have SIGDANGER (meaning,
free all you can) -> SIGTERM (terminate gracefully) -> SIGKILL (too
late, I'm killing you anyway); and maybe a MIB in sysctl like
...vm.overcommit_action  ='soft' being SIGDANGER->SIGTERM->SIGKILL and
= 'hard' being SIGKILL, so the sysadmin at least has a choice


More information about the freebsd-current mailing list