开发者

How can I increase the available memory for a process on Windows Mobile?

The amount of virtual memory available to my process is 32MB, althoug开发者_运维技巧h there's plenty more actual RAM. Is there a way (e.g. a function call or project property) that can increase this limit? I am finding the limit very....limiting.

I am looking at the usage by calling GlobalMemoryStatusEx. If there was something that could set the dwTotalVirtual member that's the kind of thing that would help.

thanks!


No, there's no way to increase that. Windows CE 5.0 and earlier had a hard, baked in limit of 32MB of virtual memory for any of the supported 32 simultaneous processes. It's part of the kernel.

Now it is worth mentioning that not all allocations come from that 32MB. From the docs (and experience):

If you call VirtualAlloc with dwSize >= 2 MB, flAllocationType set to MEM_RESERVE, and flProtect set to PAGE_NOACCESS, it automatically reserves memory in the shared memory region. This preserves per-process virtual memory.

This means that you can VirtualAlloc large regions and use that without impacting your 32MB slot limitation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜