home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!tamsun.tamu.edu!tamsun.tamu.edu!news
- From: bpb9204@tamsun.tamu.edu (Brent Burton)
- Newsgroups: comp.sys.mac.programmer
- Subject: Memory allocation in your app
- Date: 22 Jan 1993 21:49:49 -0600
- Organization: Texas A&M Univ., Inc.
- Lines: 26
- Distribution: usa
- Message-ID: <1jqf8tINNnm7@tamsun.tamu.edu>
- NNTP-Posting-Host: tamsun.tamu.edu
-
- Just a quick question.
-
- When your application starts up, it gets a contiguous block of memory
- in which the program has its heap and stack.
-
- I was looking through the Mem Mgr and found out that you can create more
- than one memory zone, where the NewPtr, NewHandle, and Dispose* calls
- are active. Does this mean that, for example in a compiler, you may
- allocate hundreds of little chunks of memory, and then when you are
- done using them, you may deallocate them all by destroying that memory
- zone?
-
- Also, when your application exits, any chunks that were allocated from
- the New* calls are automatically returned, I assume?
-
- The reasons I ask these are for those one-shot programming tasks
- where I need to create some complex data structure, and then would
- like to free it all at once.
-
- thanks,
- -Brent
- --
- +-------------------------+
- | Brent Burton N5VMG |
- | bpb9204@tamsun.tamu.edu |
- +-------------------------+
-