From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA28615; Tue, 13 Jan 2004 18:56:04 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA08096 for ; Tue, 13 Jan 2004 18:56:03 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from web21403.mail.yahoo.com (web21403.mail.yahoo.com [216.136.232.73]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id i0DHu1511854 for ; Tue, 13 Jan 2004 18:56:01 +0100 (MET) Message-ID: <20040113175600.79608.qmail@web21403.mail.yahoo.com> Received: from [209.2.165.251] by web21403.mail.yahoo.com via HTTP; Tue, 13 Jan 2004 09:56:00 PST Date: Tue, 13 Jan 2004 09:56:00 -0800 (PST) From: Lauren A Subject: [Caml-list] GC and C To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Loop: caml-list@inria.fr X-Spam: no; 0.00; camlparam:01 camlreturn:01 debugger:01 weirdly:01 ocaml:01 ocaml:01 garbage:01 collector:02 arguments:03 somewhere:04 seems:05 uses:06 fault:07 fault:07 i'm:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 properly. Does anyone have any idea what might be going on? Thank you very much, Lauren __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners