From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA31454; Fri, 30 Jan 2004 16:48:55 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA29063 for ; Fri, 30 Jan 2004 16:48:54 +0100 (MET) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0UFmrP16123 for ; Fri, 30 Jan 2004 16:48:53 +0100 (MET) Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id i0UFmgZ16933; Fri, 30 Jan 2004 09:48:44 -0600 (CST) Date: Fri, 30 Jan 2004 10:52:01 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Jacques Garrigue cc: caml-list@inria.fr Subject: Re: [Caml-list] CamlDL/Abstract pointers problem In-Reply-To: <20040131003639K.garrigue@kurims.kyoto-u.ac.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 pointers:01 jacques:01 ocaml:01 garbage:01 garrigue:01 collector:02 pointer:03 pointer:03 heap:03 heap:03 wrote:03 abstract:03 redirect:95 somewhere:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 31 Jan 2004, Jacques Garrigue wrote: > The trouble is that you may at some point in time pass to your ML > program a pointer to some C structure outside of the heap. Since it is > outside of the heap, the garbage collector does not attempt to visit > it, and this creates no problem. > But it may happen (if your structure is freed on the C side), that at > some time in the future a new page is added to the heap, containing > the location where was the C structure. If your pointer on the ML > side is still around, this is now a pointer to somewhere in the heap, > and the GC will attempt to visit it. Ah. OK. That's reasonable- solving it in the Ocaml system would be way too hard to be worthwhile. -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian ------------------- 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