Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-07-07 (15:07)
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.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: