www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/15/08:15:31

From: "Seth Hill" <ferris AT proaxis DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How much free memory ?
Date: 13 Nov 97 15:02:16 -0800
Organization: All USENET -- http://www.Supernews.com
Lines: 37
Message-ID: <B090C72C-18EBD1@206.163.152.136>
References: <346BCF2F DOT 181F AT fi DOT muni DOT cz>
NNTP-Posting-Host: 9272 AT 206 DOT 163 DOT 152 DOT 136
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, Nov 13, 1997 8:10 PM, Marian Lysak <mailto:xlysak AT fi DOT muni DOT cz>
wrote:
>I would like to know if anybody know how could I get 
>amount of free memory in DJGPP.
>---------------------
>
>In Borland C 3.1 is function [ coreleft() ] in alloc.h header file,
>but in DJGPP I couldn't find any function like this one.
>
>If you can answer to my e-mail address please.
>
>Thanks for all answers !
>
>Marian Lysak <xlysak AT fi DOT muni DOT cz>
>

Try:

#include <dpmi.h>

int get_free_mem( void )
{
    __dpmi_free_mem_info info;

    __dpmi_get_free_memory_information( &info );

    return info.largest_availible_free_block_in_bytes;
}

_____________________________________________________________________
                 Seth Hill | ferris AT proaxis DOT com
      Troposphere Software | http://www.proaxis.com/~ferris/software/

"What are we going to do tomorrow night, Brain?"
"The same thing we do every night, Pinky - Try to take over the world!


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019