64bit Address

64bit Address

I've been testing my code on the acano01 node since the documentation says it is suitable for testing purposes. The program starts off allocating memory to 32bit addresses in the heap, but before long it allocates to a 64bit address. When it tries to access that address to store a value, I get the segmentation fault.Does anyone who is more familiar with 64bit programming ever run into a problem like this? I don't get the segmentation fault when testing on my 32bit machines.Thanks!

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Making some educated guesses,

I use 64-bit linux all the time and it will randomly (sudo-randomly ;D ) return 8 and 16 byte address.
So you cannot assume only 8 byte address.

Are you casting your address to an int or some other non-pointer data structure anywhere?
Storging a pointer in a Win32 user data holder always used to catch me out, as they asre all ints.

Another guess: If you use VC++ make sure you have /MACHINE:X64 switch. Otherwise you obviously won't be able to allocate more than 2 GB. :)

Leave a Comment

Please sign in to add a comment. Not a member? Join today