[Am-info] Why does NT fail to release allocated memory?

Lewis A. Mettler lmettler@lamlaw.com
Sat, 08 Jan 2000 07:33:31 -0800


Simon,

I have noticed the problem on NT using two different applications.  One
of them I have written and the other is a commercial application.  I
have also noticed the problem using the program I have written on more
than one system (NT 4 and NT 3.51 I believe).

Currently only the commercial program is being used.  I have RAM of 128
MB and a virtual memory of 128 on NT 4.  However, as allocated memory
approaches 120 MBs several programs begin to fail and not operate
correctly.  Terminating those applications drops the allocated memory to
lower levels but the allocated memory remains higher than when the
system was booted.  In time, due to the inability or failure of NT to
release that memory allocation, NT must be restarted even if no
applications are still running.

Since I have experienced this failure with both a commercial package as
well as my own applications I assume the common denominator, NT is at
fault.

This is not necessarily the case.  However, if NT does not release all
memory back to the available pool until program termination (regardless
if free() is called or not), NT is poorly designed and can no longer be
used.

Yes. It is possible that in my application an object is instantiated and
the memory not freed up but the same affect is taking place with the
commercial version so I assume the operating system fails in this
regard.

And, I specifically recall a discussion elsewhere that NT (Microsoft)
refuses to guarantee that released memory will be returned to the pool
until program termination. So.  Either this last statement is true or
not.  If it is not true then the person was misinformed.  If it is true
then NT is no longer acceptable for any use.

Simon Cooke wrote:
> 
> From: "Lewis A. Mettler" <lmettler@lamlaw.com>
> >
> > Is NT broken?
> >
> > Why is it that allocated memory is not released by NT?  I understand
> > that Microsoft does not guarantee memory released by a program will be
> > returned to the available pool until the program is terminated?  Or,
> > does that "feature" only apply to non-Microsoft applications that do not
> > use a secret API?  Or, do not identify themselves as a Microsoft
> > application?
> >
> > Perhaps you know?
> 
> Any chance that you could be a little more specific than this? As in, give
> more cases? And perhaps use a bit better grammar so that I can understand
> what you're getting at here? Because at this moment in time, it sounds to me
> like programmer error...
> 
> Allocated memory is generally not released by any application until you call
> free() on the pointer you malloc'd, delete the object you instantiated (in
> C++) or you terminate the process (which will release all memory owned by
> that process).
> 
> If you could be more specific, I could help - possibly.
> 
> Simon
> 
> _______________________________________________
> Am-info mailing list
> Am-info@lists.essential.org
> http://lists.essential.org/mailman/listinfo/am-info

-- 
Lewis A. Mettler, Esq.(Attorney and Software Developer)
lmettler@LAMLaw.com
http://www.lamlaw.com/ (detailed review of the Microsoft antitrust
trial)