caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Lauren A <museumprogrammer@yahoo.com>
To: caml-list@inria.fr
Subject: [Caml-list] GC and C
Date: Tue, 13 Jan 2004 09:56:00 -0800 (PST)	[thread overview]
Message-ID: <20040113175600.79608.qmail@web21403.mail.yahoo.com> (raw)

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


             reply	other threads:[~2004-01-13 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13 17:56 Lauren A [this message]
2004-01-13 18:34 ` Richard Jones
2004-01-13 19:41   ` Kip Macy
2004-01-13 20:27     ` malc
2004-01-13 21:44       ` Issac Trotts
2004-01-13 22:32         ` Dustin Sallings

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=20040113175600.79608.qmail@web21403.mail.yahoo.com \
    --to=museumprogrammer@yahoo.com \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).