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 MAA08915; Mon, 13 May 2002 12:57:26 +0200 (MET DST) 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 MAA08912 for ; Mon, 13 May 2002 12:57:25 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4DAvM908128 for ; Mon, 13 May 2002 12:57:22 +0200 (MET DST) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id TAA15520; Mon, 13 May 2002 19:56:25 +0900 (JST) To: cq@htec.demon.co.uk Cc: caml-list@inria.fr Subject: Re: [Caml-list] NULL as a caml value In-Reply-To: <3CDF8FEE.7040505@htec.demon.co.uk> References: <20020512234522.A5687@kruuna.Helsinki.FI> <20020513162035N.garrigue@kurims.kyoto-u.ac.jp> <3CDF8FEE.7040505@htec.demon.co.uk> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20020513195625A.garrigue@kurims.kyoto-u.ac.jp> Date: Mon, 13 May 2002 19:56:25 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Christopher Quinn > > Yes, NULL is valid, as are all word-aligned addresses outside of the > > Caml heap. > > Does it even need to be word aligned? > If Is_long() tests positive the 'pointer' is also ignored. > I hope I have not erred!? Sure, then this is only an integer, and the GC does not follow integers. Someone even suggested that you can avoid the strange scenario I described in my previous mail by "marking" pointers, that is or-ing them with 1. If they are word aligned, then you can easily recover the original. Otherwise, looking at the runtime's source, I see nothing that would prevent from using any (even non-aligned) pointer outside of the caml heaps to be cast to a value, but the manual does not allow it explicitly, so this may mean that such non-aligned even values could be used for something else. (Actually they are already used for compaction.) Jacques ------------------- 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