From: Guillaume Yziquel <guillaume.yziquel@gmx.ch>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: Yoonseok Ko <ysko@ropas.snu.ac.kr>, caml-list@inria.fr
Subject: Re: [Caml-list] A question about GC.
Date: Mon, 13 Jun 2011 14:26:52 +0200 [thread overview]
Message-ID: <20110613122652.GB637@localhost> (raw)
In-Reply-To: <1307967660.16462.49.camel@gps-desktop>
Le Monday 13 Jun 2011 à 14:21:00 (+0200), Gerd Stolpmann a écrit :
>
> Your problem sounds a bit like as if the custom blocks were allocated
> with the wrong parameters. Remember caml_alloc_custom has four
> parameters:
>
> caml_alloc_custom(ops, size, used, max)
>
> Often one sets here used=0 and max=1, but this may be totally wrong if
> you allocate larger blocks.
muddy.c does exactly that. However, I have no idea about the size of the
blocks or data pointed to by the block.
> Better set used=1, and max is the number of
> custom block allocations until the major GC is triggered. (Imagine there
> is a water level variable w, and for every allocation w:=w+used/max, and
> if w exceeds 1.0 the water tank is full, and another major GC is
> triggered.)
>
> Maybe this helps.
>
> Gerd
--
Guillaume Yziquel
prev parent reply other threads:[~2011-06-13 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-13 0:35 Yoonseok Ko
2011-06-13 9:40 ` Guillaume Yziquel
2011-06-13 10:37 ` Philippe Wang
2011-06-13 11:34 ` ygrek
2011-06-13 12:19 ` Guillaume Yziquel
2011-06-13 13:26 ` Philippe Wang
2011-06-13 12:21 ` Gerd Stolpmann
2011-06-13 12:26 ` Guillaume Yziquel [this message]
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=20110613122652.GB637@localhost \
--to=guillaume.yziquel@gmx.ch \
--cc=caml-list@inria.fr \
--cc=info@gerd-stolpmann.de \
--cc=ysko@ropas.snu.ac.kr \
/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