Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Manually triggering garbage collection
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean Krivine <jean.krivine@g...>
Subject: Re: [Caml-list] Manually triggering garbage collection
Well if I don't set the overhead to 0, there is still a slight "
innactive memory" accumulation. However, when the memory goes back to
a reasonable level, I set the overhead back to 80 (which is the
default value) using another alarm. The result of this is that
inactive memory wobbles continuously during the execution (it
accumulates at overhead 80 and decreases at overhead 0).

J

On Tue, Jul 29, 2008 at 9:57 AM, Damien Doligez <damien.doligez@inria.fr> wrote:
> On 2008-07-29, at 15:39, Jean Krivine wrote:
>
>> OK great I' ll try,
>> For the moment I just set a Gc alarm that detects whether memory usage
>> is above a certain limit and if so, sets the overhead to 0, which
>> stops completely the memory "leak".
>
> Setting the overhead to 0 seems a bit overkill.  You might want to
> do a Gc.compact() at this point.  Or you might just need to change
> the max_overhead parameter: the lower it is, the more often the
> GC will compact the heap.
>
>> Do you think that would improve to increase the size of the major heap?
>
> Yes, sometimes it helps with fragmentation.  Also, increasing the
> heap_increment may help.
>
>> Also, do you know how often the alarm is tested? is it each time a
>> major collection is performed?
>
> The GC alarms are triggered at the end of each major collection.
>
> -- Damien
>
> _______________________________________________
> 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
>