From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 2D200BB84 for ; Fri, 16 Jan 2009 17:00:35 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AksDANA9cElQRFuwgWdsb2JhbACUBAEBFiK5eoVyhEs X-IronPort-AV: E=Sophos;i="4.37,277,1231110000"; d="scan'208";a="22594724" Received: from furbychan.cocan.org ([80.68.91.176]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 16 Jan 2009 17:00:34 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1LNr7Z-0002hJ-44; Fri, 16 Jan 2009 16:00:33 +0000 Date: Fri, 16 Jan 2009 16:00:33 +0000 To: Yitzhak Mandelbaum Cc: caml-list Subject: Re: [Caml-list] Boehm-Demers-Weiser and ocaml Message-ID: <20090116160032.GB8664@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; ocaml:01 yitzhak:01 mandelbaum:01 ocaml:01 pitfalls:01 interfacing:01 iirc:01 pointer:01 2009:98 garbage:01 wrote:01 heap:01 heap:01 caml-list:01 bdw:01 On Fri, Jan 16, 2009 at 09:46:35AM -0500, Yitzhak Mandelbaum wrote: > Has anyone tried to interface ocaml code with C libraries which depend > on the BDW garbage collector? If so, are there any pitfalls to be > aware of? Note that I have a fair amount of experience interfacing > with ordinary C code, I've just never tried to do so in the presence > of the BDW gc. I haven't so just speculating here ... Can the BDW collector be told about areas of memory which it must not examine? There is a useful macro used inside the OCaml compiled called (IIRC?) Is_in_heap(ptr) which can tell you if a pointer points to something on the OCaml heap (ie. something to be ignored). Rich. -- Richard Jones Red Hat