I ran into this issue while creating an application that ne开发者_运维技巧eds to allocate large contiguous amounts of memory and must run on 32-bit Windows XP computers with 2 GB of physical memory.
Initially I ran into out-of-memory problems. Setting the /3GB switch in boot.ini and LARGE_ADDRESS_AWARE in the executable solved the problem on my computer with 4 GB of physical memory.
The question is: can I use the same strategy on a computer with less than 4 GB of physical memory, e.g. 2 GB? I.e., are these options all about the virtual address space, or do they have some relation to physical memory as well?
The /3GB
switch does apply to virtual memory, so you can use it on a machine with less memory. It is discussed here. That's not to say that you will get great performance using that option in that situation. But if it is simply a matter of "making things work", then it may be a reasonable solution.
精彩评论