Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] OCaml-3.08.1/MinGW: alloc_tuple fails
Date: Thu, 14 Oct 2004 17:19:55 +0100	[thread overview]
Message-ID: <20041014161955.GA25356@annexia.org> (raw)
In-Reply-To: <D981925B4F2CD611870300E0184CEE9B0157F304@kaiserslautern1.lms-gmbh.de>

[-- Attachment #1: Type: text/plain, Size: 918 bytes --]

On Thu, Oct 14, 2004 at 04:59:01PM +0200, Bauer, Christoph wrote:
> 
> >  >   t = alloc_tuple( 100 );
> >  >   for( i=0 ; i < 100; ++i )
> >  >     Store_field( t, i, Int_val ( i ));
> > 
> > s/Int_val/Val_int/
> 
> 
> Ok, that's correct. But the problem is before the for-loop.

It looks correct to me, but often memory corruption happens earlier
than is detected.  Try adding a call to Gc.full_major () just before
you call your C function.  If it crashes in the Gc, then you've got
memory corruption, and you'll need to pepper your code with calls to
Gc.full_major () to try and narrow it down.

Hope that helps anyway,

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Learning Objective CAML for C, C++, Perl and Java programmers:
http://www.merjis.com/richj/computers/ocaml/tutorial/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-10-14 16:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14 14:59 AW: " Bauer, Christoph
2004-10-14 16:19 ` Richard Jones [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-10-14 13:23 Bauer, Christoph
2004-10-15 13:20 ` Damien Doligez
2004-10-15 13:45   ` Olivier Andrieu
2004-10-15 14:49     ` Damien Doligez
2004-10-16 23:56       ` Erik de Castro Lopo
2004-10-15 15:04 ` Xavier Leroy

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=20041014161955.GA25356@annexia.org \
    --to=rich@annexia.org \
    --cc=Christoph.Bauer@lms-gmbh.de \
    --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