Mail Archives: djgpp/1999/03/04/10:29:52
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?
- Raw text -