:: Your Computer Technical Resource Headquarters! :: Your Computer Technical Resource Headquarters!
Computer Support Forums arrow Computer Related Discussions arrow Tips & Tricks arrow Topic: The real truth about Win 98SE Low Resources
December 15, 2019, 04:12:35 PM

Home Forum Rules Help Search Mobile Version Login Register

Welcome, Guest. Please login or register.
Did you miss your activation email?
December 15, 2019, 04:12:35 PM

Login with username, password and session length
 Featured Sites:
New  Got pics of your modded PC or want to show off your cool desktop, visit our new Show & Tell forum!
  0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: The real truth about Win 98SE Low Resources  (Read 3053 times)
Doctor Smith
Hero Member

Karma: +0/-0
Offline Offline

Posts: 718

Dumb questions welcomed

Bookmark and Share

View Profile
« on: March 20, 2004, 03:13:06 PM »

Memory Use By Windows

The major components of the Windows API (Application Programming Interface) are Kernel,
User, and GDI. The five system resource memory "heaps" are located in USER (the input
manager) and GDI (the graphic display interface manager).

USER has one 16-bit heap and two 32-bit heaps. GDI has one 16-bit heap and one 32-bit heap.
The USER 32-bit heaps are used to store WND (window) structures--one WND for every window
in the system--and menus. The GDI heaps store fonts, brushes, palettes, bitmaps, pens, and
other graphic items. The 32-bit heaps provide a capacity greater than the system will ever
require. They don't cause resource usage problems, so for the purposes of this discussion, they
will be ignored.

Windows allocates the remaining two 64K blocks of memory to programs for tracking purposes.
These blocks are referred to as User Resources and GDI Resources. System Resources reported
by Windows will be the lesser of these two values. You can view all "three" of these values using
the Windows Resource Meter which can be run by going to Start | Programs |Accessories |
System Tools | Resource Meter and after it is loaded, double-clicking its icon in the System Tray.

***The following is excerpted from a post on Delltalk, a user forum, by Kickaha Ota who wrote it in response to a question about low memory warning from a user with a large amount of installed RAM.***

In order to understand why resources are limited, we first have to understand a bit about what
resources are and how they work. Resources are Windows objects that a program can manipulate.
For example, every window on the screen is a resource. Every picture that's displayed on the
screen is probably a resource. If an application opens a file on disk, that open file is a resource.
And so on, and so on.

If an application needs to use a resource, it asks the operating system to create or load it. For
example, a program can say, "Hey, Windows, I need to create a window that's 300 pixels wide by
200 pixels high, okay?" Windows then goes ahead and creates or loads that resource, and gives
the application back a magic number that represents it. "Okay, I've created your window, and it's
#38710." Then the application can use that magic number to ask Windows to do other things
related to that resource. "Okay, Windows; could you please display #38710 in the upper-left
corner of the screen?" "Gotcha." Finally, when an application is through with a resource, it tells
Windows to dispose of it. "Okay, please delete #38710." "Gotcha."

So, what format do these magic numbers take? Well, on most operating systems, it would be
what's called a "pointer". You can think of memory as being like a post office, a huge collection of
little boxes stretching off into the distance; every box can hold one piece of information. And just like every post office box has a number, every memory location has an address--a number
that's used to access it. A pointer to something in memory is simply the address of the area in
memory where it's stored. So, if I were a regular OS, and an application asked me to load a
window, and I loaded that window into memory starting at memory address #12345678, I would
tell the application "OK, I've loaded that window; it's #12345678."

On an Intel machine, these pointers are four bytes long. So if an application needs to hold a
pointer to something, it needs to use up four bytes of memory in order to do it. That presented a
problem to the original designers of Windows. Remember, memory was very limited back then; an
8MB machine was huge, and 4MB was more typical. And an application can use thousands and
thousands of resources. So if resources were referred to by pointers, so that an application
needed to use up four bytes of memory every time it wanted to refer to a resource, it could wind
up using up huge chunks of memory just for these resource pointers.

So, instead, the Windows designers used a different scheme. They created the resource table.
The resource table is essentially a big list of information about all the resources that are in
memory at any given time. So if an application tells Windows to load a resource, Windows finds an
empty spot in this resource table, and fills it in with the information about the resource that was
just loaded. Now, instead of giving the application a four-byte pointer to the resource, Windows
can just tell the application where the resource is in the table. If I tell Windows to load a
window, and that window winds up taking the 383rd slot in the resource table, Windows will tell
me "Okay, I've loaded the resource, and it's #383." Since these 'index numbers' are much
smaller numbers than memory addresses, under this scheme, a resource's number can be stored
in only two bytes instead of four; when you only have a few megabytes of memory to work with,
and lots of resources being used, that's a huge improvement.

There's a problem with this scheme. There's only so many different possible values that you can
store in a certain number of bytes of computer memory, just like there's only so many different
numbers you can write down if you aren't allowed to use more than a certain number of digits. If
you have four bytes of memory to work with, you can store billions of different possible values in
those four bytes. But if you only have two bytes, there's only 65536 different numbers that you
can store in those two bytes. So if you use two-byte numbers as your resource identifiers, you
can't have more than 65536 resources loaded into memory at one time; if you loaded more than
that, there'd be no way for programs to tell them apart. But on the computers of the day,
there'd be no way to fit more than a few thousand resources into memory at one time anyway. So
this limitation wasn't seen as being a problem, and the Windows designers went ahead and used
the resource table and two-byte resource identifiers.

Now, we leap ahead to the present day. Memory is incredibly cheap; the memory savings from
using two-byte resource numbers instead of four-byte pointers simply aren't significant anymore.
There'd be more than enough memory to hold hundreds of thousands of resources in memory at
one time. But there's still only 65,536 different possible resource identifiers; so only that many
resources can be loaded into memory at once. Beyond that, you're out of resources, no matter
how much memory you have left.

***End excerpt***

The number and type of applications running determine what portion of System Resources are
being used. Known Resource "hogs" include:

"Eye/Ear Candy"--Active Desktop View as Web Page, themes which use sound effects,
animated mouse cursors and desktop icons, and elaborate screen savers.

Multiple Web browser windows.

All multimedia applications.

System monitoring utilities (including the Windows Resource Meter which on my system
drops resources by 5%)

Applications that have the ability to "preview fonts in font list" such as Office 2000,
which load all installed fonts into GDI resources when the application is launched (requires
1% of GDI resources per 64 fonts).

If any 16-bit applications (Windows 3.x) are running Windows 9x/ME will treat the System
Resources allocated to all of these apps as one block and won't release them until all 16-bit apps
have been closed.

When applications are loaded, it is common for them to require additional Windows components to
be loaded as well. When the application is closed Windows will retain those components because
they are likely to be needed again, so that resources initially allocated when an application is
opened will not all be released when it is closed, although most will.
« Last Edit: March 30, 2004, 05:03:54 PM by rghasenohr » Logged

Pages: [1] Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS!

This site is NOT responsible for any damage that the information on this site may cause to your system. Everything you try, whether inspired by the response given from this site or not, is entirely at your own risk. All product names and company names used herein are for identification purpose only and may be trademarks or registered trademarks of their respective owners. We are in no way affiliated or representing any of the companies on this site unless specified.
Back to Top
Stop Spam Harvesters, Join Project Honey Pot Fight Back Against Spammers! Get Firefox! Get Thunderbird! View Sylvain Amyots profile on LinkedIn
Back to Top
Google visited last this page July 21, 2018, 05:48:48 AM