🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.rt
Article #366

Re: Memory usage on the RT.

#366
From: Johann Schweigl
Date: Thu, 14 Sep 1989 22:25
28 lines
1413 bytes
From article <1247@quintus.UUCP>, by mark@quintus.UUCP (Mark Spotswood):
> Is there any way to find out how much swap space is actually left while running,
> so that I can set the break point to a more reasonable value and avoid being
> killed?

VRM provides the information you want in the data segment of the process.

	.
	.
	.
	volatile int *freePages = (int *)0xbc;
	.
	.
	printf("number of free 2K pages in pagespace is %d\n",*freePages);
	.
	.

The volatile int declaration prevents reads to *freePages from being optimized
away by the -O option.
*freePages is modified by the VRM at unpredictable rates (unpredictable as far
as the application program is concerned).

Hope it helps. Bye,
-- 
       ------------------------------------------------------------------
       EDV Ges.m.b.H Vienna              Johann Schweigl    
       Hofmuehlgasse 3 - 5               USENET: johnny@edvvie.at
       A-1060 Vienna, Austria      Tel: (0043) (222) 59907 257 (8-19 CET)
Technical Details
Message-ID: <151@eliza.edvvie.at>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!usc!bloom-beacon!eru!luth!sunic!mcsun!tuvie!edvvie!eliza!johnny
References: <1247@quintus.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!usc!bloom-beacon!eru!luth!sunic!mcsun!tuvie!edvvie!eliza!johnny
From: johnny@edvvie.at (Johann Schweigl)
Newsgroups: comp.sys.ibm.pc.rt
Subject: Re: Memory usage on the RT.
Message-ID: <151@eliza.edvvie.at>
Date: 14 Sep 89 22:25:06 GMT
References: <1247@quintus.UUCP>
Organization: Edv GesmbH, Austria/Europa
Lines: 28