From: Sean Seefried <sean.seefried@nicta.com.au>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: "caml-list@yquem.inria.fr" <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Heaps size problems with "caml_alloc_small" in foreign function interfaces
Date: Sat, 12 Jul 2008 13:20:33 +1000 [thread overview]
Message-ID: <9CD17706-D992-4B85-998C-F47A1D8E3034@nicta.com.au> (raw)
In-Reply-To: <48776A23.2010600@inria.fr>
Could you give me a pointer to information on root registration?
What frustrates me is that this is CamlIDL generated code. Shouldn't
it just work?
Sean
On 12/07/2008, at 0:11, Xavier Leroy <Xavier.Leroy@inria.fr> wrote:
>> I'm having a problem where sometimes a call to "caml_alloc_small"
>> from C
>> results in a segmentation fault. If I increase the size of the stack
>> using OCAMLRUNPARAM=s=1000k then I don't get the crash anymore. It
>> seems
>> strange that I have to increase the size of the heap manually like
>> this.
>
> It's probably a root registration problem. These are very sensitive
> to the times when GC is triggered, which themselves are sensitive to
> the heap sizes and memory behavior of your program.
>
>> If I want to increase the size of the heap in C how do I do this?
>> Could
>> I write a "safe" caml_alloc_small which first checks to see if
>> there is
>> enough memory and then increases the heap size if not?
>
> Don't try to hack around the real problem, but do make available a
> repro case, no matter how large, on a Web site or as attachment to a
> problem report on the bug tracking system, so that others can have a
> look at it.
>
> - Xavier Leroy
next prev parent reply other threads:[~2008-07-12 3:22 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
2008-07-11 14:11 ` Xavier Leroy
2008-07-12 3:20 ` Sean Seefried [this message]
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=9CD17706-D992-4B85-998C-F47A1D8E3034@nicta.com.au \
--to=sean.seefried@nicta.com.au \
--cc=Xavier.Leroy@inria.fr \
--cc=caml-list@yquem.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