Page 104 - DCAP408_WEB_PROGRAMMING
P. 104
Windows Programming
Notes The 32-bit User window heap (2MB).
The 32-bit User menu heap (2MB).
The 16-bit GDI heap (64K).
The 32-bit GDI heap (2MB).
However, each one of these five memory segments is still fixed in size because of the Windows
9x/Me architecture, and cannot be increased, irrespective of the amount of physical memory
(RAM) installed on the machine. Modern applications stipulate more and more of the system.
The more controls an application generates and the more files it opens, the more stress is
positioned on the operating system.
Now, we have this difficulty regarding resources, but wait; it gets worse. When you first install
the operating system and start the computer, you perhaps have somewhere in the neighborhood
of 96%-98% free system resources. Over time, you install applications and utilities. Now, when
you first start the computer you may only have 70%-80% free resources. This is because many
applications install minute programs that are started when the system starts. Each of these
utilizes resources.
As you run a variety of applications, each application further reduces these system resources.
Hypothetically, when an application concludes, the resources it used should be returned to the
operating system to utilize for other applications. In the actual world, this doesn’t always take
place. In some cases, it is normal. Some shared resources are not loaded until an application
requests them. Those are not usually released when the application terminates. They are kept
loaded in memory to permit the next application quicker access to them.
Some applications, though, do not behave properly. They may not free all the resources they
assign. This is known as resource leakage. Here, a block of memory is marked by the operating
system as being in use and it cannot be utilized by the operating system, or any other application.
When this takes place, the only means to recover that area of memory is to reboot the computer.
The fact is, if you are a home user who runs a word processor, a spreadsheet, an Internet browser
and an e-mail client program, the solution is that it is not that huge problem. Those programs
are usually not horribly resource intensive and, if you reboot the computer frequently, you’ll
probably never have a trouble. If you obtain the dreaded “Unable to create control” error,
rebooting the machine will usually free resources that have been lost by misbehaving applications
and permit your computer to function usually.
Just keep in mind that applications are sharing memory here. If you encounter a system error,
such as a General Protection Fault, there is a high probability that system memory has been
tainted. You should straight away put aside any open documents and reboot the computer if you
want the system to remain stable. The computer may emerge to function generally after such an
error, but it is undependable and may cause an apparently unconnected error later on.
!
Caution If you obtain a system error, you should reboot the computer.
If, alternatively, you want to run some more resource rigorous applications, the Windows 95/
98/Me memory model will be a steady source of problems for you.
Example: A high-end graphics editor, or a program or web development
environment, etc.
If you have a comparatively new, clean install of the operating system and you haven’t installed
a lot of other programs and you don’t have a lot of fonts installed and you don’t run too many
98 LOVELY PROFESSIONAL UNIVERSITY