home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22002 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  1.3 KB

  1. Path: sparky!uunet!cs.utexas.edu!tamsun.tamu.edu!tamsun.tamu.edu!news
  2. From: bpb9204@tamsun.tamu.edu (Brent Burton)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Memory allocation in your app
  5. Date: 22 Jan 1993 21:49:49 -0600
  6. Organization: Texas A&M Univ., Inc.
  7. Lines: 26
  8. Distribution: usa
  9. Message-ID: <1jqf8tINNnm7@tamsun.tamu.edu>
  10. NNTP-Posting-Host: tamsun.tamu.edu
  11.  
  12. Just a quick question.
  13.  
  14. When your application  starts up, it gets a contiguous block of memory
  15. in which the program has its heap and stack.
  16.  
  17. I was looking through the Mem Mgr and found out that you can create more
  18. than one memory zone, where the NewPtr, NewHandle, and Dispose* calls
  19. are active.  Does this mean that, for example in a compiler, you may
  20. allocate hundreds of little chunks of memory, and then when you are
  21. done using them, you may deallocate them all by destroying that memory
  22. zone?  
  23.  
  24. Also, when your application exits, any chunks that were allocated from
  25. the New* calls are automatically returned, I assume? 
  26.  
  27. The reasons I ask these are for those one-shot programming tasks
  28. where I need to create some complex data structure, and then would
  29. like to free it all at once.
  30.  
  31. thanks,
  32. -Brent
  33. -- 
  34. +-------------------------+
  35. | Brent Burton    N5VMG   |    
  36. | bpb9204@tamsun.tamu.edu |  
  37. +-------------------------+ 
  38.