[comp.sys.mac.programmer] Out of Memory...

soe@ames.arc.nasa.gov (Brad Soe) (05/18/88)

I have seem to have run into a problem while writing an 
application in AztecC 3.4. I have a Mac II w/1K and have 
keep getting an out of memory bomb (ID = 25) bomb at
certain points in the program. I have done the following: 

1) Called InitApplZone, More Masters several times at the 
begining of the application to allocate many master pointers. 

2) I have made sure that I didn't allocate any global ptrs
(except WindowPtr's) in the application.  Nor have I used
malloc or NewPtr or have any static variables in any part 
of the program. But I have called NewHandle.

Assumptions: My program uses the ListManager, and I think that
it's code segment should be unloaded from memory at some time 
while the application is running. Do I have to purge this 
Code segment! 

I call NewWindow in the program, and it may fragment the 
heap so that a large enough data block can't be found (giving me
the bomb!). I think that the problem deals with fragementation!!

Any help or suggestions about memory management would 
be apprecieated. 


					Thanks

					Brad Soe 
					internet : ames.arc.nasa.gov
					NASA Ames Research Center 
					MS 233-18 Moffett Field, CA 94035
					(415) 694-4866