[Haskell-cafe] compressed pointers?

Jan-Willem Maessen jmaessen at alum.mit.edu
Wed Apr 16 08:17:10 EDT 2008

On Apr 16, 2008, at 4:45 AM, Ketil Malde wrote:
> I notice BEA uses something called "compressed pointers" to get the
> 64-bit (more registers, etc) benefits without paying the
> (cache-thrashing) cost.

But only if you're not *actually* using a 64-bit address space.  From  
their own documentation:

The heap size will be limited to less than 4 GB; therefore, you can  
only use this option for applications that demand less than 4 GB of  
live data. The heap will be reduced to meet this size limitation if  
you specify a larger initial (-Xms) or maximum (-Xmx) heap size.


So this amounts to saying "we can use the 64-bit ISA but still use 32- 
bit pointers with all the restrictions that accompany them".  You  
might be able to keep non-heap data around in excess of 4GB (eg it  
might be possible to mmap a file *and* have 4GB of heap data, and  
maybe even keep thread stacks off-heap as well).

You can take advantage of pointer alignment to get address spaces of  
8-32GB (by shifting 32-bit pointers before dereferencing them), but  
that requires taking back the pointer bits that GHC just stole for  
pointer tagging.


More information about the Haskell-Cafe mailing list