Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Does Caml have slow arithmetics ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier_Pérès <olivier.peres@l...>
Subject: Re: [Caml-list] Does Caml have slow arithmetics ?
Basile Starynkevitch [local] wrote:
> If you want to start a functional language implementation from
> scratch, you might (as Xavier Leroy told me) consider tagging integers
> with a 0 LSB, and having GC-ed pointers with a 1 LSB. Hence, ordinary
> C pointers (outside your heap) are handled as integers and remain
> untouched by the GC. This insight is Xavier's, not mine!

    But there is no way to be sure that a pointer you got from C is 
word-aligned. Consider, for example, a smart user sending you a string 
with the first character chopped off : this pointer has an odd LSB. And 
C hackers like to do that kind of things. Xavier Leroy obviously knows 
this, so I must have missed something.

    Olivier.

-------------------
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