Board index » delphi » Detecting Memory Size in Pascal

Detecting Memory Size in Pascal

Hello,

How do I get info about the total amount of memory (Base+EMS/XMS)in my
program? (I know there is and interrupt for this, but it returns 0)

 Doodu Ohana (ooh...@ort.org.il)

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

 

Re:Detecting Memory Size in Pascal


Quote
> How do I get info about the total amount of memory (Base+EMS/XMS)in my
> program? (I know there is and interrupt for this, but it returns 0)

You get 0 because Pascal has allocated all base memory for its heap.
For EMS and XMS memory, you have to use the EMS and XMS interfaces,
unless you're using 'Protected Mode', and Pascal has allocated this
too already.
There should be a Pascal variable called 'memavail' which tells you
how much free heap memory is avaiable (which is _not_ the usable
heap memory).

Herman

Other Threads