home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / vms / 13949 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.9 KB

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