Lisp HUG Maillist Archive

RE: memory usage in capi

> (mark-and-sweep 2) or (mark-and-sweep 3), as suggested by 
> Espen Vestre,
> appears to release no memory, as indicated by Control Panel.

<Whilst I've never used Windows ME, the following is based on Win98, which
is probably similar.>

I strongly suspect that the "X% free" displayed in the Performance panel is
actually not related to free memory at all (at least directly), but to the
number of handles left in the GDI and USER system heaps.

From memory (no pun intended), only 2^15 (2^16?) such handles are available.
If an application fails to return any allocated handles to the OS, they are
lost to the OS even after the application terminates. If this happens often
enough, Windows will report that it is low on system resources, most
applications will fail to start correctly, and basically the system will be
unusable (reboot time!).

Based on the behaviour reported by Jim, I suspect that some of the handles
that are created for every Windows object (including things like windows,
buttons, labels; even things like fonts and semaphores) are being leaked.

Cheers,
Claudio


Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
http://www.memetrics.com/emailpolicy.html


RE: memory usage in capi

* Claudio Natoli wrote:

> Based on the behaviour reported by Jim, I suspect that some of the handles
> that are created for every Windows object (including things like windows,
> buttons, labels; even things like fonts and semaphores) are being leaked.

Again, I suggest using CLEAN-DOWN - I've now tried this with LWW and
MARK-AND-SWEEP does not free stuff back to the OS their either.

--tim


Updated at: 2020-12-10 09:00 UTC