caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Adam P. Jenkins" <ajenkins@cs.umass.edu>
To: caml-list@inria.fr
Subject: GC Bug?
Date: Fri, 27 Jun 1997 06:48:42 -0400	[thread overview]
Message-ID: <199706271048.GAA05146@dwarin.oit.umass.edu> (raw)
In-Reply-To: <199706270913.FAA04748@dwarin.oit.umass.edu>

Adam P. Jenkins writes:
 > Hi, I've been trying to write a C extension for O'Caml version 1.05,
 > on Linux.  I have a C object which I want to be able to pass into
 > caml, and manipulate it with the C functions.  I'm having some
 > problems with allocation.  Here's the smallest example I can give.
 > I've even provided a Makefile, which creates a custom toplevel to test
 > this in.
 > 
 > The problem occurs in test_copy (see the C file below).   For my
 > abstract type, I just use two integers set to some magic values, which
 > should never change.  However, in copy, after I call alloc, sometimes
 > the input parameter will change.  Here's a sample session:
 > 

Hi, I'm following up to my own post because I figured out what the
problem was: I should have been saving the parameter in a root value
over the alloc call.  I guess it was getting relocated sometimes by
the GC.  

Sorry I can't post in French too; I only speak a da english.  Good
day.

Adam





  reply	other threads:[~1997-06-27 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-27  9:13 Adam P. Jenkins
1997-06-27 10:48 ` Adam P. Jenkins [this message]
1997-06-27 12:33 Damien Doligez

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=199706271048.GAA05146@dwarin.oit.umass.edu \
    --to=ajenkins@cs.umass.edu \
    --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).