[Pythonmac-SIG] OSAm leaking?

Anthony M. Ingraldi A.M.INGRALDI@larc.nasa.gov
Wed, 29 Jul 1998 15:07:27 -0400


At 10:45 AM -0700 7/24/98, Sean Hummel wrote:

>
>Another interesting tidbit is that each time you run OSAm is that the OSA
>component gets loaded and unloaded. This causes some fragmentation of the
>heap, but what can you do?

I used ZoneRanger to peak at the memory allocation for my applet. After each OSAm
load/unload cycle there are four handles left in memory above the previous
high-memory location.  (I'm using the OSAm.CompileAndExecute method.) Here's a 
sample of how memory appears after a few load/unload sequences:

Address     Size        Pad     Type    Attr    ASCII Contents                  
----------  ----------  ------  ------- -----   --------------------------------
      ... stuff deleted ...
0118851344           0      20  Handle  * L..   ..............`.........8`...
0118851376       14420       0  Free    . ...   ...ascr.....Zp..$............
0118865808           0      20  Handle  . ...   .Programming...-........ ....
0118865840           0      20  Handle  . ...   .cation runn...-........ ..-.
0118865872           0      20  Handle  . ...   .tion is run...-..-......,...
0118865904       11412       0  Free    . ...   ...ascr.....0..............
0118877328           0      20  Handle  * L..   .............. .........8`..%p
0118877360       14420       0  Free    . ...   ...ascr........ ............
0118891792           0      20  Handle  . ...   .Programming..SP..%....... ...
0118891824           0      20  Handle  . ...   .cation runn..SP..%0...... ...
0118891856           0      20  Handle  . ...   .tion is run..SP..%P......,..R0
0118891888       11412       0  Free    . ...   ...ascr........t............
0118903312           0      20  Handle  * L..   ..............+..R.......8`...
0118903344       14420       0  Free    . ...   ...ascr.....%p..$............
0118917776           0      20  Handle  . ...   .Programming..-........ ...-
0118917808           0      20  Handle  . ...   .cation runn..-..䃴...... ...
0118917840           0      20  Handle  . ...   .tion is run..-..-......,..
0118917872       11412       0  Free    . ...   ...ascr.....R0..h............
0118929296           0      20  Handle  * L..   .............. ........8`...p
0118929328       14420       0  Free    . ...   .*..ascr........ ............
0118943760           0      20  Handle  . ...   .Programming...P.......... ...
0118943792           0      20  Handle  . ...   .cation runn...P...0...... ...
0118943824           0      20  Handle  . ...   .tion is run...P...P......,...0
0118943856       11412       0  Free    . ...   ...ascr.......P............
0118955280           0      20  Handle  * L..   .........................QP...
0118955312     1265988       0  Free    . ...   ...............p..3......7pt

--
  Tony Ingraldi                | e-mail: A.M.INGRALDI@LaRC.NASA.GOV 
  NASA Langley Research Center |                                     
  Mail Stop 267                | Phone : (757) 864-3039             
  Hampton, VA  23681-2199      | Fax   : (757) 864-7892