[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Memory Management (fwd)
- To: hughes@aristotle.ils.nwu.edu
- Subject: Memory Management (fwd)
- From: alms@cambridge.apple.com (Andrew L. M. Shalit)
- Date: Wed, 6 Jun 90 17:59:13 -0400
- Cc: info-macl
> From hughes@aristotle.ils.nwu.edu Wed Jun 6 11:18:00 1990
>
> On page 190 of the 1.3.1 manual it talks about MACL
> dynamically reallocating the Mac heap as needed. This
> is normally a very nice feature however I have run
> into a situation where this is now annoying. I
> wish to builds lots of little pixmaps. At a certain
> point I reach the boundary of the preallocated
> Mac heap and now everytime my program allocates
> memory for a small pixmap it GCs as it dynamically
> reallocates the heap. Net result: an exceedingly
> long time to create all the pixmaps even though
> *overall* I have plenty of MACL memory. Is there
> some way in which I can cause the default mac heap
> size (associated with MACL) to be larger?
>
> Thanks in advance for you help,
>
> Lucian Hughes
Allocate a BIG pointer with _NewPtr. This should be as big as
all your pixmaps put together. Allocating this will cause a GC
and a heap boundary shift. Then deallocate the pointer with
_DisposPtr. Then go ahead and allocate pixmaps.
-andrew