PCBUILD Archives

Personal Computer Hardware discussion List

PCBUILD@LISTSERV.ICORS.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
PCBUILD - Personal Computer Hardware discussion List <[log in to unmask]>
Date:
Wed, 3 Mar 1999 18:37:27 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (87 lines)
On 3 Mar 99, at 14:34, Susan Hays wrote:
>  Explain why RAM memory has nothing to do with having low
> resources.  I was just told that I needed to up my RAM to 128
> because of this.  I currently have 48, but I do have a lot of
> programs running in the background.  I have a 300 Pentium
> Gateway.  I too am running a HP722C and an OfficeJet 520.

Because the 16 bit resource heaps are fixed in size and
independent of installed RAM.

Fire up the resource monitor and have a look at your "free
resources".

Some explanation of what these sensors display may be in order:

The windows API (application programming interface) is contained
in a few DLLs. The most important are Kernel (functions for managing
memory, processes and threads), User (functions for user interface
such as window creation and messages), GDI (functions for drawing
graphical images and displaying text).

Windows has five seperate "heaps" (areas of memory) for USER
and GDI to store things. These heaps are of fixed size and cannot
be adjusted. They are unrelated to virtual memory settings or free
RAM.

USER has a 16 bit heap and two 32 bit heaps.
One of these 32 bit heaps stores WND (window) stuctures. There is a
WND for every window in the system. The structure holds important
info about the window.
The other 32 bit heap stores menus. The 16 bit heap stores things
like window classes,message queues etc.

GDI has a 16 bit heap and a 32 bit heap.
GDI uses its heaps to store fonts, regions, brushes, device contexts,
pens etc (graphical stuff).

These "free resources" are just the amount of memory left in the
GDI and USER system heaps.

There is a  phenomenon  called resource "leakage". Suppose a program
wants to draw something in its window. It has to obtain a DC (device
context) for the device (the screen). It needs to obtain a "pen" to
draw with. These are all GDI objects that are stored in the heaps.
After it is done with these objects, it has to give them back to
windows If the programmer forgets to do this, you have a situation
where the object is no longer used but belongs to the program still.
When the program wants to draw again, it has to ask for the objects
again, this time, a new DC or pen is used. This uses up more memory
from the GDI heap since that for the previous pen and DC were never
released. Thus you see the % dropping. When the program is closed,
not all the resouces used by it may be released (they are cached by
the system). In addition, the system itself uses some resources, the
longer you run it, the greater the resource drain you'll see.

Many of the HP Deskjet drivers for win98/95 have a resource leak
in their initialization routines.
When an application such as MS Word opens a new document it
does a printer init. The result of this when the HP driver is default
is a GDI leak. Microsoft documents this bug in the HP drivers
in the Knowledge Base http://support.microsoft.com

I use Pegasus Mail. This has a module called TER that does text
formatting (RTF, ETF, HTML) for email messages. Every open
TER window causes a printer init. When I'm using win98 I cannot
have my HP Deskjet as default and read mail because the GDI
resources fall drastically (enough to cause a system crash).

This problem does not occur when I'm using NT 4.0. This OS has
no 16 bit resource heaps to get depleted. The printer drivers are
also written by Microsoft and are superior to those from HP.

Increasing your RAM to 128 MB will help in multitasking but will
have no effect on resource levels.

HTH


Gerard R Thomas
Port of Spain,  Trinidad and Tobago
mailto:[log in to unmask]  mailto:[log in to unmask]
PGP Key IDs: RSA:0x9DBCDE7D  DH/DSS:0xFF7155A2

            Do you want to signoff PCBUILD or just change to
                    Digest mode - visit our web site:
                    http://nospin.com/pc/pcbuild.html

ATOM RSS1 RSS2