/LARGEADDRESSAWARE:YES

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

No, it should work.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Yeah! Assuming that PureBasic does not use the 31st bit for anything special. (many old programs used the 31st bit as a flag)
Hence this EXE flag as it tells the OS that the program will treat any memory pointer as a memory pointer. (even if it's in the $8xxxxxxx+ range)

So technically PureBasic could just have the large flag set by default,
but just because PureBasic itself does things properly does not mean we coders do. So the large flag would need to be off by default and enableable in the IDE.

The main issue is people that iterate through memory pointers using for loops etc. It "is" possible to mess up the subtraction/addition when cycling through memory pointers.

Myself I've always tried to consider the possibility of memory pointers being larger than $7FFFFFFF, and I never try to assume a pointer is always positive. (actually, pointers are best displayed as hex IMO)

I'd be very happy if this option was available in the compiler/IDE as it would mean a 32bit program could theoretically get 2GB extra memory on a 64bit Windows.

How is Linux and OSX in regards to large addressing btw have they always supported it?

But as freak said, there's always the 64bit edition ;)
Post Reply