Date: Thu, 4 Mar 1999 19:12:07 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: SAMUEL ALMESTRM cc: djgpp AT delorie DOT com Subject: Re: memory allocation In-Reply-To: <36DEA63E.80B5A3AC@elektro.ing.hb.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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?