www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/04/12:13:56

Date: Thu, 4 Mar 1999 19:12:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: SAMUEL ALMESTRM <EL9712 AT elektro DOT ing DOT hb DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: memory allocation
In-Reply-To: <36DEA63E.80B5A3AC@elektro.ing.hb.se>
Message-ID: <Pine.SUN.3.91.990304190645.29560B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 4 Mar 1999, SAMUEL ALMESTRM wrote:

> I have a problem then I first malloc a lot of memory (all available RAM)
> and then I later uses the free command of that memory block I would like
> it to be free, but it don't! If I once again malloc that much memory
> then it is stored in the harddrive (virtual memory).
> But why? I thought I had released all malloced memory?

There's a lot of subtle issues involved in this, and you didn't even tell 
whether you run on DOS or Windows, or whether you use DJGPP v2.01 or v2.02, 
which makes this impossible to explain in a short message.

I suggest to read chapter 15 of the DJGPP FAQ list (v2/faq211b.zip from 
the same place you get DJGPP).  If after that you still don't understand 
the behavior of your program, please ask specific questions here.

> If I have more than 32768 Mb left then I start the program, how can it
> be using virtual memory?

How do you know it uses virtual memory?

- Raw text -


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