Message-ID: <36DEA63E.80B5A3AC@elektro.ing.hb.se> Date: Thu, 04 Mar 1999 16:26:54 +0100 From: "SAMUEL ALMESTRM" Organization: University of Boras, Sweden X-Mailer: Mozilla 4.05 [en] (WinNT; I) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: memory allocation Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com 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? int *test; test = (int *) malloc(32768000); for (i=0; i<32768; i++) test[i]=i; // just fill the memory free (test); test = (int *) malloc(32768000); for (i=0; i<32768; i++) test[i]=i; // just fill the memory If I have more than 32768 Mb left then I start the program, how can it be using virtual memory?