Windows 95 provides a significant increase in the system resources available to Windows-based and MS-DOS – based applications over what was available under earlier versions of Windows. The net result for users is that they can count on more system resources being available for creating windows, using fonts, running five or more applications simultaneously, and so on.
Windows 3.1 maintained 64K regions of memory heaps for use by the graphics device interface (GDI) and USER system components. These heaps stored GDI or memory object information allocated when an application called a Windows API function. The amount of space available in the combination of these two heaps is identified as a percentage of system resources that are free (that percentage appears in the Help About dialog box in My Computer and other Windows-based applications). Under Windows 3.1, when the calculated amount of free space dropped to a low number, the system often reported that it was out of memory even though the amount of free memory shown in the About dialog box was still quite high. This was often due to low memory in either the GDI or USER heap, or both.
In Windows 95, to help reduce the system resource limitation, many data structures formerly stored in the 16-bit GDI and USER heaps are now stored in 32-bit heaps. This provides more room for the remaining data elements to be created.
The following table shows the system limits in Windows 95, as compared to the constraining limits under Windows 3.1. For information about how to assess performance of key system resources, see "Identifying Performance Problems with System Monitor" later in this chapter. For information about the supporting architecture, see Chapter 31, "Windows 95 Architecture."
Windows 95 System Limits
Resource | Windows 3.11 | Windows 952 |
Windows Menu handles | ~299 | 32K |
Timers | 32 | Unlimited |
COM and LPT ports | 4 per type | Unlimited |
Items per listbox | 8K | 32K |
Data per listbox | 64K | Unlimited |
Data per edit control | 64K | Unlimited |
Regions | All in 64K segment | Unlimited |
Physical pens and brushes | All in 64K segment | Unlimited |
Logical pens and brushes | All in 64K segment | All in 64K segment |
Logical fonts | All in 64K segment | 750 – 800 |
Installed fonts | 250 – 300 (best case) | 1000 |
Device contexts | 200 (best case) | 16K |
1 Limits for GDI objects in Windows 3.1 are not exact because all regions, physical objects, logical objects, device contexts (DCs), and installed fonts had to fit in a single 64K segment. Because many of these have been moved to the 32-bit heap, Windows 95 provides much more room for those remaining items, such as logical pens, brushes, and so on. The remaining items in the Windows 95 local heap are all less than 10 – 20 bytes each.
2 System-wide resources, unless noted otherwise.