Physical Memory Limits Number of Processes/Threads (94840)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 3.1
- the operating system: Microsoft Windows NT 3.5
This article was previously published under Q94840
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 );
Modification Type: | Major | Last Reviewed: | 3/15/2004 |
---|
Keywords: | KB94840 |
---|
|