caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Damien Doligez <damien.doligez@inria.fr>
To: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Manually triggering garbage collection
Date: Tue, 29 Jul 2008 15:57:29 +0200	[thread overview]
Message-ID: <B9673052-9E8E-4FAD-A692-B52C9E5BB6B7@inria.fr> (raw)
In-Reply-To: <86F95E46-EF71-47F9-AE76-D765225CB597@inria.fr>

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


       reply	other threads:[~2008-07-29 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <86F95E46-EF71-47F9-AE76-D765225CB597@inria.fr>
2008-07-29 13:57 ` Damien Doligez [this message]
2008-07-29 14:04   ` Jean Krivine
2008-07-26 19:15 Jean Krivine
     [not found] ` <08F66ABF-5C25-4D49-8B0B-77B2F757C1DD@inria.fr>
2008-07-29 13:39   ` [Caml-list] " Jean Krivine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B9673052-9E8E-4FAD-A692-B52C9E5BB6B7@inria.fr \
    --to=damien.doligez@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).