Browse thread
AW: [Caml-list] The tag bit
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe Raffalli <christophe.raffalli@u...> |
| Subject: | Re: AW: [Caml-list] The tag bit |
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