[MLton] 64-bit pointers
Stephen Weeks
MLton@mlton.org
Sun, 4 Sep 2005 20:20:14 -0700
> Why do you believe that headers must be the same size as pointers?
One issue is that we would like array lengths to be 64 bits. Since
array lengths live in the header portion of an object, it could get a
bit confusing to have some portions of the header be 64 bits and some
be 32 bits. But I guess it's not absolutely necessary to have header
size = pointer size = array length size, and would make the code a bit
cleaner to eliminate the assumption. So, the following would work as
an array header.
---------------------------------------------------------
| 64-bit mark index | 64-bit length | 32-bit header |
---------------------------------------------------------
I was also concerned about the pointer reversal used during marking in
a mark-compact GC. I was thinking that pointers got stored in
headers, but they don't. So no problem there.
I guess we need separate knobs for controlling Array.maxLen and
pointer size. I suppose one could want 64-bit pointers and array
lengths limited to 32 bits.