delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/20/09:46:37

From: halite AT medison DOT co DOT kr (SangGyu Nam)
Newsgroups: comp.os.msdos.djgpp
Subject: How can I calculate the amount of free memory?
Date: Mon, 20 Apr 1998 22:33:59 +0900
Organization: Medison
Lines: 19
Message-ID: <MPG.fa5ddb0a80eb0f5989682@news.hansol.net>
NNTP-Posting-Host: hidden.medison.co.kr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello.

I'm making an image handling program using DPMI.
The program displays some images such as BMP, JPG...
Whenever an image displayed, I traced the free amount of
free memory by using DPMI function 0x0500.
The function returns correct value when I allocate memory
but after free it, I could not get valid information.
Only the amount before free() was returned.

Someone said, because it's the property of runtime library.
In other words, free() does not return memory to DPMI
automatically. So if I want to get correct information,
must use any function such as _heapshrink().
The function returns all freed memory to DPMI.

But it did not work. I could not get yet.

How can I get the realtime free amount of DPMI memory?

- Raw text -


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