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] how to "disable" GC?
Date: Mon, 14 Mar 2005 00:12:25 +0100	[thread overview]
Message-ID: <1f63a9ce4272cab600c2e1f2a63c8cf3@inria.fr> (raw)
In-Reply-To: <20050312.225725.125114910.eijiro_sumii@anet.ne.jp>

On Mar 13, 2005, at 04:57, Eijiro Sumii wrote:

>   setenv OCAMLRUNPARAM 's=1000000000,v=0x1ff'
>
> and its variants, but none of them seem to stop GC from happening -
> and once it happens, it's MUCH slower of course!  By the way, the
> machine has 8GB main memory.
>
> So, my questions are:
>
> 1. How does the GC happen at all when the minor heap is so huge?  The
>    programs don't seem to use so much memory anyway...

Look for "caml_check_urgent_gc" in the runtime sources and you'll see
that minor collections can be triggered even if the minor heap is not
full if needed, in order to do a slice of major GC.

So if you allocate some things that go directly into the major heap
(for example reasonably large arrays or strings) you need a big major
heap as well as a big minor heap:

   setenv OCAMLRUNPARAM 's=500M,h=500M,v=0x1ff'

-- Damien


  parent reply	other threads:[~2005-03-13 23:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-13  3:57 Eijiro Sumii
2005-03-13 12:52 ` [Caml-list] " Thomas Fischbacher
2005-03-13 14:52   ` Eijiro Sumii
2005-03-13 16:17     ` Kurt Welgehausen
2005-03-13 17:41       ` Eijiro Sumii
2005-03-13 23:12 ` Damien Doligez [this message]
2005-03-14 15:17   ` Ken Rose
2005-03-15 19:39     ` Damien Doligez

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=1f63a9ce4272cab600c2e1f2a63c8cf3@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).