[net.micro.mac] Speeding up memory allocation

kearns@garfield.columbia.edu (Steve Kearns) (07/25/86)

Here is a tip that speeds up memory allocation by a factor of 5.  
If you use Lightspeed C memory management routines (malloc or mlalloc)
try removing the call to ResrvMem  in the mlalloc routine in the 
<storage> project.  (you must recompile and reload the project to 
activate the change, of course).  I found that calls to malloc 
sped up by a at least a factor of 5, in my program.  
	The only potential problem with this is that memory may tend to get more
gapped.  
	Note that the mac Ptr allocating routine (NewPtr) automatically calls
ResrvMem, so using NewHandle and locking without calling it should be much
faster.  
	ResrvMem tries all possible ways of allocating a memory block low in 
memory.  Its only purpose is to try and allocate memroy as low as possible;
If this memory is to be locked this action supposedly prevents memory from
getting as gapped.  
	(I have an old mac, old roms, etc.. )

-steve
(kearns@columbia-20)