🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.misc
1 messages
1 total messages Started by Califf Thu, 03 Nov 1988 14:37
MS-Windows question...
#1064
Author: 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?...
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads