64bit Address

64bit Address

Ritratto di percoction

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 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di duncanhopkins

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.

Ritratto di max001

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. :)

Accedere per lasciare un commento.