compressed pointer type implementation in gcc

Robert Dewar dewar@adacore.com
Sat Jul 19 15:35:00 GMT 2008


Yair Lifshitz wrote:
> Hi,
> 
> I hope I'm not flooding with this topic. I've did some research and
> couldn't find anything relevant on this topic.
> My team is developing a large scale CAD application that has a large
> memory footprint, requiring strong machines to run.
> 
> The application uses pointers massively.
> During one of our optimization cycles I noticed that since most
> objects are aligned on 8-byte boundaries, it's possible to drop the
> lower 3 bits of the address and reconstruct the full address later.
> 
> Basically, as long as the application is in the 32G range (2^32*2^3),
> it's possible to represent aligned pointers using an unsigned int - 4
> bytes.

why not just run in 32 bit mode in this case?
What's the point of using 64-bit addresses if you
don't need them?



More information about the Gcc mailing list