From: Bob Subject: Re: How to know much memory left? To: andy AT smart DOT csie DOT ntu DOT edu DOT tw (Oz the Wizard) Date: Fri, 14 Apr 1995 07:22:24 -0500 (CDT) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu > > Hi > > After reading the mails about porting Borland to DJGPP, > I am reminded another function "coreleft()." > How do I know how much memory are free? > > I use a lot of "new" operations in my program, and I want > to know whether I return all of memory that I allocate. > I think I may check the subroutine by comparing the amount > of memory before running and those after running. there's a function in _go32 [actually 2 functions, one is a macro i think, tho] something like: _go32_get_info_about_my_computer(bunch of vars) and _go32_get_free_physical_memory_so_i_dont_run_out() _go32_get_free_virtual_memory_so_i_dont_run_out() [please see the go32 headers or docs in the info tree for the correct names. i don't have them available on this computer or id give you the correct ones] only difference seems to be that under borland when you do a coreleft you get something like: 48325 or _maybe_ 425993 if compiled in large or something and w/ the same program under djgpp you get 31425876 :) [at least my version of borland c doesn't have an extender. do the latest releases?] bob -- Robert Hollinger <-------------------------------------> 4B Chaucer Ln. > \ www- http://www.xnet.com/~bob / < Disclaimer: Streamwood, IL 60107 > \/\/ bob AT xnet DOT com \/\/ < 708-483-9391 <------------------------------------->I don't know her! Coach: How about a beer, Norm? Norm: Hey I'm high on life, Coach. Of course, beer is my life.