Mail Archives: djgpp/1998/10/25/12:41:41
Sahab Yazdani wrote:
>
> Well first of all I'd like to thank everybody for their help with my
> previous problems... now down to the real matters...
>
> I'd like to know if I can see the amount of free memory that is
> available to the application that I'm writing. For instance in Watcom I
> could do this:
>
> void main() {
> // Non-Important Code
> printf("Amount of Free Memory: %dK\n",_memmax());
> // Non-Important Code
> }
>
> or something along those lines, is there any such function in DJGPP?
>
> its not really important, move that I just want to know if its possible
> (and where other software developers get their info from :=) ).
__dpmi_get_free_mem_info will give you a lot of statistics, but many of
them are not really meaningful. For instance, `free'd memory is not
released to the DPMI server, but is kept for future `malloc's. So
`free'ing will not increase the amount of memory that this function will
claim is available.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -