[英]Running 32bit Borland XE2 app under Win 7 64bit with /3gb switch (-GF LARGEADDRESSAWARE )?
As the title states, I am running a 32 bit application under win 7 64 bit. 如标题所示,我正在win 7 64位下运行32位应用程序。 The application is made in C++ in Embarcadero XE2.
该应用程序是在Embarcadero XE2中以C ++编写的。 I need more than 2GB of memory.
我需要超过2GB的内存。
Steps: - I enabled the 3GB switch and I rebooted the pc. 步骤:-我启用了3GB开关,然后重新启动了PC。 - I tried adding -GF: LARGEADDRESSAWARE to project options/c++ linker/Output Flags but then linking failed.
-我尝试将-GF:LARGEADDRESSAWARE添加到项目选项/ C ++链接器/输出标志,但是链接失败。 It said: "Failed command GF:" or something like that.
它说:“ GF命令失败:”或类似的内容。 I then found on a forum that you should do it manually in the .bpr file under FLAGS section.
然后,我在论坛上发现您应该在FLAGS部分下的.bpr文件中手动进行此操作。 I added the flag and then the project linked.
我添加了标志,然后将项目链接了。 However, my memory available indicator in the app tells me i'm still getting under 2 GB.
但是,应用程序中的可用内存指示器告诉我,我的内存仍不足2 GB。
Questions: 1. how to properly make this work ? 问题:1.如何正确进行这项工作? 2. how to tell if I got 3gb of memory or not?
2.如何判断我是否有3gb的内存?
Thank you in advance 先感谢您
The /3GB
switch is for 32 bit systems only. /3GB
开关仅适用于32位系统。 Your system is a 64 bit system. 您的系统是64位系统。 That means that a 32 bit executable with the
LARGEADDRESSAWARE
PE flag will have a 4GB address space. 这意味着带有
LARGEADDRESSAWARE
PE标志的32位可执行文件将具有4GB地址空间。 Don't attempt to use the /3GB
boot option. 不要尝试使用
/3GB
引导选项。
You can check whether or not your executable has the LARGEADDRESSAWARE
PE flag set by using any PE viewing tool. 您可以使用任何PE查看工具来检查可执行文件是否设置了
LARGEADDRESSAWARE
PE标志。 With the MS toolchain you would use dumpbin
. 使用MS工具链,您将使用
dumpbin
。 The Embarcadero toolchain equivalent is tdump
. Embarcadero工具链的等效项是
tdump
。 In addition, there are countless GUI PE viewers. 此外,还有无数的GUI PE查看器。 Find a tool that works and make sure that you have properly set this PE flag.
查找一个有效的工具,并确保已正确设置此PE标志。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.