TITLE: Windows System Resources PRODUCT: WordPerfect 6.0 for Windows This document explains how system resources are used by Windows. What's in this document?  The "Core" Files of Windows  Memory Usage  Using System Resources  Troubleshooting System Resource Problems The "Core" Files of Windows Three files run all Windows applications, and they are considered to be the "core" of Windows. These files are KRNL386.EXE, GDI.EXE, and USER.EXE. KRNL386.EXE loads and executes Windows applications and handles their memory management. GDI.EXE manages graphics and printing. USER.EXE controls user input and output, including the keyboard, mouse, drivers, timer, ports, and window management. Memory Usage GDI.EXE and USER.EXE each have storage areas called heaps. Each heap consists of one 64K block of memory. GDI has one local heap; USER has a menu heap and a user heap. These heap locations make up system resources. All together, 192K of memory is set aside as system resources. System resources are shared by all applications running under Windows. The amount of memory set aside for resources remains the same regardless of the amount of physical memory available to Windows. This means that when Windows is started, a user with 2M of RAM will be allocated the same amount of memory for system resources as a user with 32M of RAM. A good analogy is to think of memory as a room and system resources as 3 boxes in the room. No matter how large a room you place the boxes in, the boxes remain the same size and hold the same amount. Using System Resources Windows and Windows applications use system resources to create and maintain various types of objects and processes. A Windows program can create six GDI objects: pens, brushes, fonts, bitmaps, regions, and palettes. Space for each of these objects is allocated in the GDI heap. For example, a user who has 800 fonts installed uses more GDI system resources than a user who has 80 fonts installed. When an application creates windows and menus, these objects take up room in the USER heap. When an application ends, Windows usually reclaims the memory used by objects in the USER heap. GDI objects are destroyed by the application that created them and the memory used by the objects is added back to the GDI heap. Resources can be lost when objects are not released properly. Creating GDI objects that are never destroyed is the most common cause of lost system resources. If too many system resources are lost, and either the USER heap or the GDI heap gets too full, performance will decrease for the entire Windows system. The Program Manager's About Program Manager dialog box displays a Free System Resources value. This value shows the amount of room left in the heap (USER or GDI) with the smallest amount of free space. The easiest way to tell if an application is losing system resources is to examine the Program Manager's Free System Resources value before and after running a application. It is acceptable if this value goes down a little the first time the application is run, but if the value decreases every time the application runs and exits, system resources are being allocated and not released. Running WordPerfect for Windows 6.0 exhibits approximately a 2%- 6% reduction of system resources upon exiting the first time. These percentages are an average and actual results may vary between users. Subsequent use of WordPerfect for Windows 6.0 should not result in further loss of resources, which again indicates that resources are being released properly. Troubleshooting System Resource Problems If you suspect an application is not returning resources properly, test the application by repeating the same procedure several times, making sure to check system resources after exiting the application each time. For example, start the application, open a document, print the document, and exit the application. Check the system resources under About Program Manager and note the percentage of resources left. Repeat the process a few times and note the results. If resources drop consistently every time the process is completed, a problem is evident. Further troubleshooting may be needed to determine the exact cause of resource loss. If an application error or the user abnormally stops an application, a substantial amount of resources can be lost. Since applications need to destroy objects and free the heap memory they are using for other applications to use, ending a program prematurely does not allow the application to complete the process of freeing resources. These resources are lost until Windows is restarted. If an application is terminated abnormally, we recommend that you exit and restart Windows to restore lost system resources. Although the possibility of errors occurring can increase when system resources get low, most applications have error-handling routines to recover from situations where resources are not available to complete a process. Also, after using Windows for an extended time without exiting, many users experience an eventual loss of resources. This may be partly due to opening and closing several applications and using applications or processes that lose small amounts of resources. Over time, these losses can deplete the GDI and USER heaps. Exiting and restarting Windows can restore these resources to the system. If you find yourself running with low system resources, you can try the following steps:  Exit and restart Windows periodically.  Run with fewer applications running in the background.  Remove unnecessary fonts from the Fonts section of the Control Panel.  Remove any unneeded drivers (such as printer or sound drivers).  Set the wallpaper and screen saver in the Desktop section of the Control Panel to None. Note: Some of the steps listed above may not be suitable or may not provide substantial benefit in your particular situation. Carefully consider the advantages and disadvantages of each step to decide if it is appropriate in your situation.