caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Heaps size problems with "caml_alloc_small" in foreign function interfaces
@ 2008-07-11  8:21 Sean Seefried
  2008-07-11  9:40 ` [Caml-list] " Richard Jones
  2008-07-11 14:11 ` Xavier Leroy
  0 siblings, 2 replies; 8+ messages in thread
From: Sean Seefried @ 2008-07-11  8:21 UTC (permalink / raw)
  To: caml-list

Hi,

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. Is this because I'm calling this function from C?

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?

Sean


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-12  6:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-11  8:21 Heaps size problems with "caml_alloc_small" in foreign function interfaces 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
2008-07-12  6:00   ` Sean Seefried

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).