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-08 (03:41)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] Does Caml have slow arithmetics ?
On Wed, Jul 07, 2004 at 07:43:13PM +0200, Olivier P?r?s wrote:
> David Brown wrote:
> >
> >The only pointers that ocaml "cares" about (in the sense of the GC or
> >polymorphic compare) are those that are allocated on the ocaml heap.
>    Sure, but the reason given above to zero-tag integers was to have C 
> pointers "look" like integers to the GC. However, C pointers are not 
> necessarily aligned and thus may mislead the GC into trying to 
> garbage-collect them.

No.  Aligned C pointers look like pointers to the GC.  It uses a bitmap
to distinguish between C pointers and ocaml heap managed pointers.
Misaligned pointers are the ones that will look like integers to the GC.


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