Setting IMAGE_FILE_LARGE_ADDRESS_AWARE on Vista

435 views
Skip to first unread message

Alex K.

unread,
Jul 20, 2009, 2:41:10 AM7/20/09
to
Hello,

I recently bought a computer with 8GB of RAM specifically to use it
with a memory intensive algorithm.

Yet, on my Vista OS apparently I need to set the flag
"IMAGE_FILE_LARGE_ADDRESS_AWARE" in order to access more than 2GB of
RAM with my program.

How do I set this flag with the gcc tools (the linker?) ?

The VC++ linker has the option /LARGEADDRESSAWARE . Is there
something similar with gcc?

Thank you in advance.

Jan Seiffert

unread,
Jul 20, 2009, 10:26:31 AM7/20/09
to

It depends on your toolchain.
If you are using cygwin, i don't know.
But for Mingw, a quick google for "LARGEADDRESSAWARE gnu ld"
turns up "--large-address-aware". You have to pass it down to ld through gcc by
'-Wl,--large-address-aware'.
That is if you are using mingw with gnu ld.
But beware, this is still 32-Bit, so somewhere below 4GB (3GB?) is you max..
Win64 support is still unfinished AFAIK (or in the latest and greatest CVS
snapshots + still itchy).

> Thank you in advance.

Greetings
Jan

--
Q: How many hardware engineers does it take to change a lightbulb?
A: None. We'll fix it in software.

Reply all
Reply to author
Forward
0 new messages