[MLton] 64-bit pointers

Matthew Fluet fluet@cs.cornell.edu
Sun, 4 Sep 2005 21:20:25 -0400 (EDT)


>>> These schemes vary in the number of bits to represent a pointer in an
>>> object, the time to load a pointer from memory into a register, the
>>> amount of addressable memory, and the object alignment.
> ...
>>> 	bits	time	mem(G)	align
> ...
>>> G	64	fast	 4G	8
>
>> Why is the object alignment in scheme G necessarily 8 and not 4?
>
> I think it was simply generalizing over the current situation, where
> pointers are 4 bytes and objects are 4-byte aligned.  I don't see any
> necessary reason for doing it.

Good.

> But it probably won't cost much, since
> headers must be the same size as pointers, so objects will already be
> bigger.

Why do you believe that headers must be the same size as pointers?  I 
agree that objects will already be bigger, because the minimum object size 
(including length 0 arrays) must be big enough to hold the forwarding 
(object) pointer, but I don't believe that impacts headers.