Mail Archives: djgpp/2000/09/16/15:15:10
HI,
Has it is clearly stated in Faq15_2.html:
"When you call free, DJGPP library doesn't return memory to the
system, it just adds it to its internal pool of free pages. So, from
the point of view of the DPMI server, these pages are not "free". "
My question is:
Isn't there some way to return memory to system (besides quitting the
program!)?
About Win95, it will give as much as the program needs, BUT only
until the memory and the swap file aren't EXAUSTED.
If you have a program that is constantly allocatting memory, and
freeing it when he no longer needs it, soon the resources are exauted,
because the DPMI won't "see" they have been freed.
Thus using free() has no impact, purelly a cosmetic sense.
Returning the memory to the system, will free that resource and enable
its use.
Otherwise, deppending on how much ram the computer has, or /and how
much the virtual memory size is setup in Win95, the program will
faile to allocate memory, altough only a small amount of memory is
actually in use.
In MS Visual C, _heapmin() takes care of this.
Thanks.
- Raw text -