Loading ...
Sorry, an error occurred while loading the content.

garbage collection and C

Expand Messages
  • Lauren A
    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
    Message 1 of 1 , Jan 13, 2004
    • 0 Attachment
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.