www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/27/13:16:06

To: Kimberley Burchett <OKRA AT max DOT tiac DOT net>
Cc: DJGPP Mailing List <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Re: topline
Date: Mon, 27 Feb 95 19:23:54 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>

>   Is it me or is topline not updated when I free something?

An excerpt from the DJGPP FAQ list:

15.2  Q: I did malloc(50*1024*1024), but didn't see any paging happen, and
         I only have 8 MBytes of RAM on my machine.  Is this virtual
         memory thing for real?
      Q: I malloc()'ed a large chunk of memory, but when I check values
         returned by _go32_remaining_physical_memory(), I don't see any
         change...
      Q: When I free() allocated RAM, _go32_remaining_physical_memory()
         reports there was no change in available RAM.
      A: In non-DPMI modes, go32 only pages in memory when it is actually
         accessed.  If you only malloc() it, but don't access it, it won't
         grab those pages.  Try calloc() and see the BIG difference.  When
         you call free(), go32 doesn't return memory to the system, it
         just adds it to its internal pool of free pages.  So, from the
         system point of view, these pages are not ``free''.

Really, people, it's for you that I wrote that list, so please,
*please*, PLEASE read it before posting...  Doing an fgrep -i on
that file is still faster than waiting for the answers from the
net, I suppose, right?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019