Browse thread
Heaps size problems with "caml_alloc_small" in foreign function interfaces
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2008-07-11 (08:21) |
From: | Sean Seefried <sean.seefried@n...> |
Subject: | Heaps size problems with "caml_alloc_small" in foreign function interfaces |
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