www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/30/02:19:50

Date: Wed, 30 Aug 1995 07:32:30 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Davide Rossi <rossi AT cs DOT unibo DOT it>
Cc: sandmann AT clio DOT rice DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: v2 memory crazyness

On Wed, 30 Aug 1995, Davide Rossi wrote:

> OK, anyway I can live happily with this behavior too, I just wanted to
> report that.

But this is nothing new: it is even explained in the DJGPP FAQ list 
(available as faq102.zip from the same place you get DJGPP):

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 (VCPI server) point of view, these pages are not ``free''.

- Raw text -


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