caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Sean Seefried <sean.seefried@nicta.com.au>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Heaps size problems with "caml_alloc_small" in foreign function interfaces
Date: Fri, 11 Jul 2008 16:56:36 +0100	[thread overview]
Message-ID: <20080711155635.GA5107@annexia.org> (raw)
In-Reply-To: <A51F1205-D329-4B63-A5E2-4E848E27225E@nicta.com.au>

On Fri, Jul 11, 2008 at 08:21:45PM +1000, Sean Seefried wrote:
> caml_alloc_small(32,0);
> 
> is what seemed to cause the problem. I'm shying away from posting more  
> code since it is auto-generated from CamlIDL and is very verbose. I  
> didn't write it myself.

You need to post a reproducer.

> >Secondly (and much more likely to be the problem), the caml_alloc*
> >functions allocate uninitialised memory.  If the garbage collector
> 
> What do you mean by "uninitialised memory"?

Memory which hasn't been explicitly initialized, and so contains
random stuff.  The GC attempts to interpret the random stuff and
fails.

[...]
> What do you do about this? Is there a way to stop the GC from running  
> for a period of time?

The GC could possibly run any time you call an allocation function.
So don't call allocation functions.

Anyhow, you really need to post some code at this point.

Rich.

-- 
Richard Jones
Red Hat


  reply	other threads:[~2008-07-11 15:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11  8:21 Sean Seefried
2008-07-11  9:40 ` [Caml-list] " Richard Jones
2008-07-11  9:51   ` Richard Jones
2008-07-11 10:21   ` Sean Seefried
2008-07-11 15:56     ` Richard Jones [this message]
2008-07-11 14:11 ` Xavier Leroy
2008-07-12  3:20   ` Sean Seefried
2008-07-12  6:00   ` Sean Seefried
2008-07-12  6:07 Sean Seefried
2008-07-12  6:09 ` Sean Seefried
2008-07-12  8:50 ` Richard Jones
2008-07-13 13:25   ` Sean Seefried
2008-07-13 13:37     ` Gordon Henriksen
2008-07-13 14:03     ` Thomas Crimi

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=20080711155635.GA5107@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=sean.seefried@nicta.com.au \
    /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).