Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] GC and C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-13 (17:56)
From: Lauren A <museumprogrammer@y...>
Subject: [Caml-list] GC and C
I'm trying to call an already-written C function from
my OCaml code. I've written a wrapper for the C
function (in C) that calls CAMLparam on the incoming
arguments and uses CAMLreturn for the return value. 

Somewhere in the middle of my program, I get a seg
fault, which, when I use a debugger, looks like it's
coming from the garbage collector. Weirdly, when I
call Gc.compact() in my OCaml code-- either directly
before or after calling my C wrapper function-- I
don't get a seg fault and everything seems to work

Does anyone have any idea what might be going on?

Thank you very much,

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: