home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vms:13949 comp.windows.x.motif:5755
- Path: sparky!uunet!haven.umd.edu!umd5!bill.ab.umd.edu!bill
- From: bill@bill.ab.umd.edu (Bill Bame)
- Newsgroups: comp.os.vms,comp.windows.x.motif
- Subject: Saving memory in VMS/Motif
- Keywords: VMS,XWINDOWS,MOTIF
- Message-ID: <15087@umd5.umd.edu>
- Date: 21 Aug 92 17:38:05 GMT
- Sender: news@umd5.umd.edu
- Reply-To: bill@office.ab.umd.edu
- Organization: M.I.E.M.S.S.
- Lines: 33
-
- For those of you who develop your own VMS DECwindows/MOTIF applications, here
- is a little trick I found to reduce memory usage...
-
- After you initialize the interface, make a call to $PURGEWS. This is
- especially nice for small applications. To get an idea of how much memory
- you can save, consider the following...
-
- I created an extremely simple MOTIF-based application containing one (1)
- pushbutton widget (I used UIL, but it doesn't make much difference) and ran it
- from a DECterm window. Control-T reported MEM=1385. I then added a call
- to $PURGEWS right before XtMainLoop, recompiled/reran it, and Control-T
- reported MEM=455. I know this isn't very accurate (the DECterm is taking
- up some of that), but given the large difference, I think is proves the point.
-
- Just in case you want it...
-
- purgeWS() {
- long status,addr[2];
- addr[0] = 0; addr[1] = 0x7FFFFFFF;
- status = sys$purgews(&addr);
- }
-
- I wonder if we could talk DEC into incorporating like this into some of their
- RAM hogging MOTIF applications (Mail and Calendar especially)?
- --
- --------------------------------------------------------------------------------
- William P. Bame | sneakernet: William P. Bame
- internet: bill@bill.ab.umd.edu | M.I.E.M.S.S.
- bbame@achi1.ab.umd.edu | 22 South Greene Street
- AT&T : [Work] (410) 328-3062 | Baltimore, MD 21201
- CIS : 71620,425 | Room: T1R55
- --------------------------------------------------------------------------------
-
-