From: pajonk AT ajax DOT umcs DOT lublin DOT pl (Grzegorz Ludorowski) Newsgroups: comp.os.msdos.djgpp Subject: how to free memory? Date: 4 Jan 1997 15:20:46 GMT Lines: 22 Message-ID: <5alsge$fj0$1@helios.man.lublin.pl> NNTP-Posting-Host: ajax.umcs.lublin.pl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi! I've got a problem with "free" (or "xfree") routines - it's silly I know, but they seems not to work... I tried program listed below, and after freeing that "dummy" pointer, free memory doesn't change... If anybody coud test it and help. #include #include #include int *dummy; void main () { printf ("At start: physical mem %d virtual mem %d\n",_go32_dpmi_remaining_physical_memory (),_go32_dpmi_remaining_virtual_memory ()); dummy = (int*) malloc (100000); printf ("After allocating 100kbytes: physical mem %d virtual mem %d\n",_go32_dpmi_remaining_physical_memory (),_go32_dpmi_remaining_virtual_memory ()); free (dummy); printf ("After releasing 100kbytes: physical mem %d virtual mem %d\n",_go32_dpmi_remaining_physical_memory (),_go32_dpmi_remaining_virtual_memory ()); } Grzegorz "LUDO" Ludorowski http://ajax.umcs.lublin.pl/~pajonk