Path: 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 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)