Click here to Skip to main content
15,886,714 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello,

How to write code for Large Address Aware in c# .net?

Please help me.

Thanks in Advance

Ankit Agarwal
Software Engineer
Posted
Updated 29-Jun-17 8:05am
Comments
Mukesh Ghosh 31-Jul-13 5:15am    
What do you mean by Large Address? Can you explain more?
[no name] 31-Jul-13 5:18am    
like this:-
http://www.zhihua-lai.com/acm/large-address-aware/

but i am not understanding that where i write th code in our c# .net application.
Maarten Kools 31-Jul-13 5:23am    
As far as I understand there's no need to "code" anything. It just tells your 32bit application (64 bit doesn't need modifications) that it is able to allocate beyond the 4GB limit. If you fail to set the flag, and you go beyond the limit, you'll just get an OutOfMemoryException.

You can do this as a PostBuild Task.
In the "Build Events" tab, use this line:

editbin /largeaddressaware $(YourTargetPath)

Good luck,
Edo
 
Share this answer
 
Hi

You should write following code in the post build event of the project for which you want to allow to exe use more the 2GB memory.

call "$(VS100COMNTOOLS)..\tools\vsvars32.bat"
editbin /largeaddressaware $(TargetPath)

By following command you can check any exe file is enabled largeaddressaware or not.

C:\> DumpBin /Headers yourexename.exe

Thanks,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900