On 10-02-2010, Dario Teixeira <darioteixe...@yahoo.com> wrote:
> Hi,
>
>> I always wanted to have kernel spport for this. Some way for aplication
>> to tell the kernel about freeable memory and for the kernel to request
>> some memory to be freeed instead of swapping it out.
>
> If I recall correctly, there was an Lwn.net article reporting a lkml
> (the Linux kernel mailing list) discussion on that subject.  One of
> the proposals was for the kernel to send processes a signal (SIGFREE?)
> requesting they free up memory (by running a major GC, for example)
> whenever memory was running low.  In theory this could in some cases
> avoid the invocation of the draconian OOM killer.
>
> Question: just how effective such a feature would be in the Ocaml case?
>
>

I forgot to tell about other paths I have followed: setrlimit/getrlimit.
There are limits like RLIMIT_DATA, RLIMIT_RSS et al (CPU...). setrlimit
limits memory by generating ENOMEM when limits are reached and getrlimit
should give information about the current level of use of these limits.
Unfortunately, the memory consumption I get with getrlimit is not
accurate (in fact not updated).

I have OCaml bindings for this, I should published in a near future. 

Regards,
Sylvain Le Gall

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to