32位EXE设置LARGEADDRESSAWARE [英] 32 bit EXE set LARGEADDRESSAWARE

查看:124
本文介绍了32位EXE设置LARGEADDRESSAWARE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在VS 2005 .NET 2.0中有一个32位的Windows应用程序,在重启1.3 GB时出现内存异常失败,我启用了LARGEADDRESSAWARE Windows7应用程序上的标志工作正常,直到2.1 GB。



我没有在Windows Server 2003 SP2标准版上找到很多信息。



将带有标志设置的exe或boot.ini文件中所需的任何更改设置为最大4 GB吗?



请建议您是否有任何想法/早些时候遇到这个问题。





先谢谢。



谢谢,

Shreyas



I have a 32 bit windows application deveoped in VS 2005 .NET 2.0 , it was failing with memory exception on reacing 1.3 GB , I enabled LARGEADDRESSAWARE flag on windows7 application worked fine till 2.1 GB .

I didnt find much info online for Windows Server 2003 SP2 standard edition .

Will the exe with flag set work or any changes required in boot.ini file to set upto max 4 GB ?

Please suggest if you have any idea / faced this issue earlier.


Thanks in Advance.

Thanks,
Shreyas

推荐答案

正如您所理解的,Win32可寻址空间仅为4Gb,但在32位操作系统版本上,它仅限于2Gb(其余部分由OS保留),并且可以扩展为3.在64位版本上,在WoW64下执行32位应用程序:http://en.wikiped ia.org/wiki/WOW64 [ ^ ]。



如果是WoW64,你的应用程序可以达到4Gb。



但并非全部。我不确定你是否正确计算你的内存使用量。 (不,你不应该依赖任务管理器。)你可以计算你使用的一些数据对象的内存,但这不是你需要的所有内存。简单地说,如果你没有足够的内存,你就没有足够的内存。操作系统并没有试图让你满意并隐藏一些宝贵的内存。您应该考虑迁移到64位体系结构,或者通过优化体系结构或将部分数据保留在磁盘上来限制内存消耗。







我在发布这个答案后得知你以后一直在使用内存分析器。好吧,非常好......



-SA
As you should understand, Win32 addressable space is only 4Gb, but, on 32-bit OS versions, it is limited to only 2Gb (the rest is reserved by OS), and can be extended to 3. On 64-bit versions, a 32-bit application is executed under WoW64: http://en.wikipedia.org/wiki/WOW64[^].

In case of WoW64, your application can get up to 4Gb.

But that's not all. I'm not sure if you are calculating your memory usage correctly. (And no, you should not rely on the Task Manager.) You may count the memory you take for some data object(s) you use, but this is not all memory you need. Simply enough, if you have not enough memory, you just don't have enough. OS is not trying to full you around and hide some valuable memory under the hood. You should either think of migrating to 64-bit architectures or limit your memory consumption by refining your architecture or keeping part of data on the disk.



I learned that you have been using a memory profiler later, after I posted this answer. Well, very good…

—SA


这篇关于32位EXE设置LARGEADDRESSAWARE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆