home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- Path: sparky!uunet!gatech!cc.gatech.edu!terminus!byrne
- From: byrne@terminus.gatech.edu (Michael Byrne)
- Subject: Re: Q: Purging/Compacting mem from XCMDs?
- Message-ID: <1992Sep15.210037.14698@cc.gatech.edu>
- Sender: news@cc.gatech.edu
- Organization: College of Computing
- References: <1992Sep15.161219.13167@leland.Stanford.EDU>
- Date: Tue, 15 Sep 1992 21:00:37 GMT
- Lines: 31
-
- In article <1992Sep15.161219.13167@leland.Stanford.EDU> felciano@summit.stanford.edu (Ramon M. Felciano) writes:
- >Hi --
- >
- >I'm writing an XCMD that does animation in a window. I want to create a
- >frame buffer to store a series of frames (basically a wide GWorld
- >consisting of a series of side-by-side rects). I'm having trouble
- >figuring out exactly how much memory is available to me from within the
- >XCMD. Can I purge memory? Can I compact the heap? How much extra do I
- >need to leave so that HC can still survive once I leave the XCMD?
- >
- >Thanks!
- >
- >Ramon
- >
- >+-------------------------------------------------------------+
- >| Ramon M. Felciano felciano@summit.stanford.edu |
- >| (415) 723-9688 |
- >+-------------------------------------------------------------+
-
- You can purge and compact the heap by calling _MaxMem, which return the
- size of the largest contiguous block in the heap.
-
- When you leave your XCMD, though, you should return ALL of the memory back
- to HyperCard (unless your XCMD is re-entrant, in which case you'll just
- have to experiment...).
-
- ================================================================================
- Mike "Suburn" Byrne | "Only the mediocre are
- byrne@cc.gatech.edu | always at their best."
- Grad student in Psychology/Cognitive Science |
- 25947 GA Tech Station, Atlanta, GA 30332 | -Jean Giradoux
-