开发者

How can I increase my application memory, till using the VirtualAlloc function, with the WOW64?

开发者 https://www.devze.com 2022-12-23 13:06 出处:网络
I have application that runs on x86 32Win and we use 1.2Gbyte memory which allocated from the function VirtualAlloc(to prevent page faults).

I have application that runs on x86 32Win and we use 1.2Gbyte memory which allocated from the function VirtualAlloc(to prevent page faults).

I really want to increase my application memory so I recompiled my project under MSDVE 2008 with wow64 (OS Exp 64Bit).

I tried to allocate more than 2Gbyte and the function Vi开发者_开发知识库rtualAlloc return error.

I even tried to set the flag LARGEADDRESSWARE to on, and the result was the same!

How can I increase my application memory, till using the VirtualAlloc function, with the WOW64?


Are you making a single call to VirtualAlloc? If so the OS will need to return a single continuous address range.

Although a LARGEADDRESSAWARE 32-bit exe can access the full 4GB of address space under WOW64 it doesn't mean you can find a continuous piece of address space >2GB.

Try making multiple calls for smaller blocks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号