Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Win32 DMD as Large Address Aware. #2507

Merged
merged 1 commit into from Aug 30, 2013

Conversation

Abscissa
Copy link
Contributor

This allows Win32 DMD to use more than 2GB on 64-bit Windows (http://support.microsoft.com/default.aspx?scid=889654), which has become necessary for building Phobos, as well as other larger projects.

This requires the latest master of OPTLINK (this commit or newer). For convenience, I've posted a pre-built OPTLINK and a wiki page for manually building OPTLINK.

@ghost
Copy link

ghost commented Aug 30, 2013

Sweet deal! Hopefully this gives us some breathing space.

@braddr
Copy link
Member

braddr commented Aug 30, 2013

not really.. win32 still has to work and won't benefit.. right?

@ghost
Copy link

ghost commented Aug 30, 2013

Ah right..

@yebblies
Copy link
Member

win32 should still benefit if you have more than 2GB of ram...

@Abscissa
Copy link
Contributor Author

win32 should still benefit if you have more than 2GB of ram...

In certain cases, yea, it will allow DMD to use up to 3GB of virtual address space on a 32-bit Windows OS (not necessarily related to physical RAM - so, at least in theory, you may not need 2GB+ as long as you have enough pagefile and lots of time to wait for all the thrashing...unless there's some other limitation I don't know about). But, on 32-bit versions of at least XP and 2003, Windows needs to (somehow) be booted with some special /3GB switch before it will actually use an application's "Large Address Aware" flag. I assume the same is true for 32-bit vista and up, but I can't find clear info on that.

On 64-bit Windows though, this "Large Address Aware" flag alone is enough to give DMD access to as much as 4GB of virtual address space. No special boot parameters needed on any version of 64-bit Windows.

@yebblies
Copy link
Member

Heh, I didn't know you needed edit boot.ini. So I guess this has no effect for most people running win32, but a positive one for win64. Sounds good.

yebblies added a commit that referenced this pull request Aug 30, 2013
Build Win32 DMD as Large Address Aware.
@yebblies yebblies merged commit 5c994c8 into dlang:master Aug 30, 2013
@ghost
Copy link

ghost commented Aug 30, 2013

Here's more info on /3GB:
http://msdn.microsoft.com/en-us/library/ff556232.aspx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants