TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Erik Huelsmann
from: David Noon
date: 1994-07-22 22:59:00
subject: Allocated memory - how d

On Monday, 1994-07-18  Erik Huelsmann wrote to All about "Allocated
memory - how do" as follows:

EH> I am looking for a function that tells me how much memory 
EH> my application has allocated at the moment, since the 
EH> following thing does not work:

[Some almost-Pascal code deleted.]

EH> So, where can I get the number of bytes OS/2 knows I have 
EH> allocated in the system?
EH> 
EH> HELP!

Hi Erik,

I'm afraid you have to clarify what you mean by "memory" in the
context of a program running under OS/2. From a program's point of
view, OS/2 has as much memory as there is free space on the
drive/partition holding the current SWAPPER.DAT file, up to the
system-imposed limit of 512MB per process.

Thus, your progam can use up to 512MB of virtual memory, provided you
have enough swap space on your disk drive.

However, there is an API call available to DosQuerySysInfo() using the
QSV_TOTAVAILMEM parameter that will give you a hint as to how much you
can acquire before you crash OS/2. Note that the returned value is
_advisory_ rather than definite.

Regards

Dave

___
 X KWQ/2 1.2e X Get the facts first. You can distort them later.

--- Maximus/2 2.01wb

* Origin: OS/2 Shareware BBS, Fairfax, VA: 703-385-4325 (1:109/347)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430
SEEN-BY: 711/807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 109/347 2 1 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.