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 OAA12644; Fri, 13 Aug 2004 14:58:42 +0200 (MET DST) 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 OAA10552 for ; Fri, 13 Aug 2004 14:58:40 +0200 (MET DST) Received: from smtp.cegetel.net (mf00.sitadelle.com [212.94.174.77]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i7DCwdmL012303 for ; Fri, 13 Aug 2004 14:58:40 +0200 Received: from univ-savoie.fr (unknown [80.125.77.158]) by smtp.cegetel.net (Postfix) with ESMTP id 79853672A6; Fri, 13 Aug 2004 14:58:34 +0200 (CEST) Message-ID: <411CBAF6.3010101@univ-savoie.fr> Date: Fri, 13 Aug 2004 14:58:30 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jacques Garrigue Cc: Christoph.Bauer@lms-gmbh.de, caml-list@inria.fr Subject: Re: AW: [Caml-list] The tag bit References: <20040813.125329.74721093.garrigue@kurims.kyoto-u.ac.jp> In-Reply-To: <20040813.125329.74721093.garrigue@kurims.kyoto-u.ac.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at nez-perce with ID 411CBAFF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; raffalli:01 raffalli:01 univ-savoie:01 caml-list:01 pointers:01 hashtbl:01 caml's:01 savoie:01 chablais:01 73376:01 univ-savoie:01 lama:01 enigmail:01 mutt:01 christophe:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk There is a less costly way to avoid the tag bit in integer: "conservative GC": any int which happens to point in an alloccated block (or only at the beginning if you do not consider C but ML) is considered as a pointer. You will have very few wrong pointers (especially in the second case). Moreover, array of int or float, or block of memory can be tagged with a flag saying they do not old pointer. The Boehm GC for C and C++ is very succefull to do that and very often allow you to share data-structure in C as you would in ML (not caring about who will release first the data) and gain both speed and memory. Does anyone have a comparison between two identical GC except one should have a tag bit and the other be conservative ? The cost of conservative GC is the test to know if an int is pointing in (or at the beginning) of an allocated block which require for instance a hashtbl of allocated blocks by adress ranges. I don't know if the gain for arithmetic + easier C interface would compensate the lost in the GC for a real GC like Caml's. -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- ------------------- 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