big arrays [was Re: bug found]

Stephen Weeks MLton@sourcelight.com
Tue, 27 Nov 2001 13:08:59 -0800


> Why do we need to distinguish between stack's and cont's?  

Darn.  I was hoping you wouldn't ask that.  Truth is, I don't really
know. 

> If the only difference between stacks and conts is that the latter
> has used == reserved, then that's easily tested at any point where
> we need to distinguish between the two (we'll already know that the
> object is a stack/cont).  And, I don't even see where that
> distinction is used.

It's only used in the forward function right now.  I agree that we
could use the "used == reserved", unless we decide that we want to let
the GC shrink stacks so that used == reserved, which we don't do now.
I can see situations with lots of threads where that might be useful.
But since we don't do it, I'm happy to drop the tag bit for now.

So that leaves my proposal as

Header word
              mark
        31 30 29
normal   1  0  
stack    1  1  
array    0  0

Seems like a reasonable way to get 2G arrays to me.