Date: Sun, 16 Apr 1995 08:27:31 +0300 From: eliz AT is DOT elta DOT co DOT il. (Eli Zaretskii) To: andy AT smart DOT csie DOT ntu DOT edu DOT tw Subject: Re: How to know much memory left? Cc: djgpp AT sun DOT soe DOT clarkson DOT edu > After reading the mails about porting Borland to DJGPP, > I am reminded another function "coreleft()." > How do I know how much memory are free? There are functions named _go32_dpmi_get_free_memory_information(), _go32_dpmi_remaining_virtual_memory() and _go32_dpmi_remaining_physical_memory() in the library which you might consider using. In addition, if you are only interested in free physical memory, you can put ``topline'' into your GO32 environment variable and watch the free memory change dynamically as the program runs. > Another question: > If I do not return all of dynamically allocated memory > before I quit the program, is there any harm to the system? No. The allocated memory gets automagically deallocated when your program exits.