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 HAA26019; Fri, 30 Jan 2004 07:01:26 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA26077 for ; Fri, 30 Jan 2004 07:01:25 +0100 (MET) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id i0U61Nv07768 for ; Fri, 30 Jan 2004 07:01:24 +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 i0U60vZ26922; Fri, 30 Jan 2004 00:01:02 -0600 (CST) Date: Fri, 30 Jan 2004 01:04:16 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Jacques Garrigue cc: rich@annexia.org, Subject: Re: [Caml-list] CamlDL/Abstract pointers problem In-Reply-To: <20040130092031V.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 pointers:01 malloc:01 garbage:01 garrigue:01 address:96 pointer:03 pointer:03 heap:03 wrote:03 allocated:03 abstract:03 redirect:95 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 30 Jan 2004, Jacques Garrigue wrote: > However, there is another scenario which could cause you problems: > if for some reason your C pointer get freed, and later the ML heap is > extended so that it includes the address of the pointer, then you may > have some pointers left on the ML which will now be seen as ML > pointers. ML doesn't memset memory it just allocated? This may be a problem- I don't *think* the C standard requires malloc to memset the memory itself, which means you might be getting garbage memory. -- "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