Physical Memory Limits Number of Processes/ThreadsLast reviewed: November 2, 1995Article ID: Q94840 |
The information in this article applies to:
Each time Windows NT creates an object, such as a process or a thread, it must allocate a certain amount of physical memory (nonpaged pool) for its support. The amount of memory that is needed for support of a process object is significantly higher than the memory requirement for support of a thread object. The amount of memory that is required for a thread object on a RISC machine is higher than the memory requirement for a thread on an x86 machine, due to the greater number and size of registers on the RISC machines. Due to the physical memory requirement of processes and threads, programs that use the CreateProcess() and CreateThread() APIs should be careful to check their return codes to detect out-of-memory conditions. On Windows NT 3.5, each time a process is created it reserves the minimum working set of memory. On a 32 MB system, the default minimum working set is 200 KB. Therefore, on a 32 MB system, you can create ~100 processes. You can lower your minimum working set to 80 KB (the lowest allowed) with the following call:
SetProcessWorkingSetSize( (HANDLE)(-1), 20*4096, 100*4096 ); |
Additional reference words: 3.10 3.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |