Users of Windows 95, 98 or even ME (collectively referred to as Windows 9x in this paper) may have noticed an odd occurrence while using their systems. During normal operation, they may receive a notice that their system is low on system resources, despite having an abundance of memory installed on their machine and a large hard drive with enough free space for the virtual memory swap file. The perception is that the system has run out of available memory. This is because what Windows 9x refers to as memory and resources are different. Memory or Random Access Memory (RAM) is physical internal memory installed on a computer system. Resources are areas of memory used to track usage of objects in Windows. But there is more to it than just that. This paper explores resource implementation in Windows 9x operating systems.
The Windows 3.x legacy.
Resources are lists of memory (called heaps) that point to where user elements and other objects are stored. Windows 3.x uses four 16-bit heaps; three for the user interface, and one for the Graphic Device Interface (GDI). The 16-bit addressing limits the size of each heap to 64K each, for a total of only 256K of memory to store objects. If an application needs more than the system can allocate, an out-of-memory error occurs. This was one of the major limitation in Windows 3.x, but necessary due to its underlying MS-DOS operating system.
Windows 9x has greatly increased the number of GDI and User resources available to applications. The three 16-bit User heaps have been replaced by one 16-bit heap and two 32-bit heaps. A 32-bit heap was also added to the GDI 16-bit heap. The two 16-bit (64K) heaps are used for tracking purposes and are known respectively as User and GDI resources and are sometimes each called a resource table. When referring to the amount of resources available to the system, the lesser of the two values are used.