🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.misc
Article #1064

MS-Windows question...

#1064
From: Califf
Date: Thu, 03 Nov 1988 14:37
17 lines
1437 bytes
I have a small window program in which I am constantly allocating small
amounts of memory from my local heap. I allocate the memory by using the
LocalAlloc function, and then using the LocalLock function to retrieve
a pointer to that memory space. Once through using the memory, I release 
the memory by first unlocking it and then freeing it. When allocating the 
memory, I use the flags which allow the memory to be allocated as MOVEABLE. 
  The problem seems to occur when I release all of the memory and use the
LocalCompact function to compact memory. The first time the program begins to
allocate any memory, I call LocalCompact to see how much CONTIGUIOUS memory
is avaliable. The number returned from this function indicates about 49000
bytes of free memory space. After allocating and then FREEING
all of the memory, LocalCompact will not RECLAIM that memory for me, and
eventually if I keep allocating and freeing memory, I run out of LOCAL
HEAP and the program won't continue to run.
   Does anybody know what is happening, or has anyone ever experienced this
problem?...
Technical Details
Message-ID: <7491@ihlpl.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!ukma!rutgers!att!ihlpl!shan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!ukma!rutgers!att!ihlpl!shan
From: shan@ihlpl.ATT.COM (Califf)
Newsgroups: comp.windows.misc
Subject: MS-Windows question...
Keywords: Does anybody know? ...
Message-ID: <7491@ihlpl.ATT.COM>
Date: 3 Nov 88 14:37:12 GMT
Organization: AT&T Bell Laboratories - Naperville, Illinois
Lines: 17