short pointers (32 bit) in 64 bit apps
Nicholas Sherlock
n.sherlock@gmail.com
Wed May 19 08:55:00 GMT 2010
On 19/05/2010 3:58 p.m., Reza Roboubi wrote:
> Do you know what it takes to do it? How much work for a newcomer to get
> up to speed with gcc? (Maybe this should go to the developer list?)
You would need to write a memory allocator which divides the address
space into 4GB (32-bit pages). Then you could create a new malloc
routine which has an extra argument to allow you to allocate memory from
within a specified 4GB page. That way you can make all of your
allocations for a given data structure lie within the same region.
Then you can add the top 32-bits to pointer addresses within your data
structure before you attempt to dereference them.
Cheers,
Nicholas Sherlock
More information about the Gcc-help
mailing list