This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: compressed pointer type implementation in gcc
- From: "Yair Lifshitz" <luna dot starlight at gmail dot com>
- To: "Robert Dewar" <dewar at adacore dot com>
- Cc: gcc at gcc dot gnu dot org, "Yair Lifshitz" <yair dot lifshitz at intel dot com>
- Date: Sat, 19 Jul 2008 18:35:05 +0300
- Subject: Re: compressed pointer type implementation in gcc
- References: <9D3FF9CB8AF1694AB811321FF6378F3603849741@hasmsx415.ger.corp.intel.com> <b90c57030807190825s55fb452ct755617b4e017d0a1@mail.gmail.com> <b90c57030807190829h5e8c097fyf3d0bd436b0f419c@mail.gmail.com> <4882090F.7000909@adacore.com>
The application does go well beyond the 4GB range.
By using this implementation I can use 32-bit pointers for most
objects (those that do not require <8byte alignment, i.e. chars, etc.)
while still have a 32GB address range.
On 7/19/08, Robert Dewar <dewar@adacore.com> wrote:
> 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?
>