INFO: Behavior of GetFreeSystemResources() on 32-bit Windows (194924)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 4.0
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows XP
This article was previously published under Q194924 SUMMARY
Under Windows 3.1x, GetFreeSystemResources() returned the free percentage
of a specified type of Windows resource. The available types of resources
were System, GDI, and User. Each type of resource was allocated from its
own 64K heap.
Because of a drastic architectural change in the way resources are
allocated between Windows 3.1x and Windows NT or Windows 2000, it does not
really make sense to call GetFreeSystemResources() on Windows NT or Windows
2000. Therefore, GetFreeSystemResources() always returns 90% for 16-bit
programs running on Microsoft Windows NT, Microsoft Windows 2000, or Microsoft Windows XP.
MORE INFORMATION
The GetFreeSystemResources() function is not part of the 32-bit Windows
API. However, Windows NT and Windows 2000 provide backward compatibility
for 16-bit programs through a Virtual DOS Machine (VDM) and a subsystem
called Windows on Windows (WOW). A VDM is a 32-bit process that is subject
to the same resource limitations as any other 32-bit process. With help
from the WOW, it emulates Windows 3.1x on Windows NT, Windows 2000, and Windows XP. All 16-bit Windows applications run as tasks under a VDM. The WOW runs as a task alongside these applications and provides support for the 16-bit API. Using this method, 16-bit applications can call outdated APIs such as GetSystemFreeResources().
Windows NT, Windows 2000, and Windows XP handle resources in a completely different manner from 16-bit Windows. On Windows NT, Windows 2000, and Windows XP each process has 4 GB of virtual address space. This address space is divided into user application space and system space. The system space is further divided for different types of system resources. It is possible to use every address allotted for a certain type of resource. If you do this, then no more allocations of that type of resource can be made. Because of this change in architecture between Windows 3.1x and Windows NT or Windows 2000 or Windows XP, it does not really make sense to call GetFreeSystemResources() on Windows NT, Windows 2000, and Windows XP.
It is unlikely that a single 16-bit program will exhaust any one particular
type of resource within Windows NT, Windows 2000, or Windows XP. However, if enough 16-bit applications are running in a single VDM, it is possible that they will collectively exhaust the resources available to the VDM. For this reason, Windows NT, Windows 2000, and Windows XP support launching 16-bit applications in separate VDMs. For more information on how to do this, see the references below.
Modification Type: | Minor | Last Reviewed: | 3/21/2005 |
---|
Keywords: | kbAPI kbinfo kbKernBase kbResource KB194924 |
---|
|