home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / hypercar / 3444 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.8 KB  |  43 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!gatech!cc.gatech.edu!terminus!byrne
  3. From: byrne@terminus.gatech.edu (Michael Byrne)
  4. Subject: Re: Q: Purging/Compacting mem from XCMDs?
  5. Message-ID: <1992Sep15.210037.14698@cc.gatech.edu>
  6. Sender: news@cc.gatech.edu
  7. Organization: College of Computing
  8. References: <1992Sep15.161219.13167@leland.Stanford.EDU>
  9. Date: Tue, 15 Sep 1992 21:00:37 GMT
  10. Lines: 31
  11.  
  12. In article <1992Sep15.161219.13167@leland.Stanford.EDU> felciano@summit.stanford.edu (Ramon M. Felciano) writes:
  13. >Hi --
  14. >
  15. >I'm writing an XCMD that does animation in a window. I want to create a
  16. >frame buffer to store a series of frames (basically a wide GWorld
  17. >consisting of a series of side-by-side rects). I'm having trouble
  18. >figuring out exactly how much memory is available to me from within the
  19. >XCMD. Can I purge memory? Can I compact the heap? How much extra do I
  20. >need to leave so that HC can still survive once I leave the XCMD?
  21. >
  22. >Thanks!
  23. >
  24. >Ramon
  25. >
  26. >+-------------------------------------------------------------+
  27. >| Ramon M. Felciano           felciano@summit.stanford.edu    |
  28. >|                             (415) 723-9688                  |
  29. >+-------------------------------------------------------------+
  30.  
  31. You can purge and compact the heap by calling _MaxMem, which return the 
  32. size of the largest contiguous block in the heap.
  33.  
  34. When you leave your XCMD, though, you should return ALL of the memory back
  35. to HyperCard (unless your XCMD is re-entrant, in which case you'll just
  36. have to experiment...).
  37.  
  38. ================================================================================
  39. Mike "Suburn" Byrne                           |  "Only the mediocre are 
  40. byrne@cc.gatech.edu                           |   always at their best."
  41. Grad student in Psychology/Cognitive Science  |
  42. 25947 GA Tech Station, Atlanta, GA 30332      |                -Jean Giradoux
  43.