MemoryMonitor.st
changeset 1206 e3894601c394
parent 1205 0b60eda64a3b
child 1261 f59a1039ae3c
equal deleted inserted replaced
1205:0b60eda64a3b 1206:e3894601c394
   554 
   554 
   555     "Modified: 23.1.1997 / 22:37:06 / cg"
   555     "Modified: 23.1.1997 / 22:37:06 / cg"
   556 !
   556 !
   557 
   557 
   558 memoryMenu
   558 memoryMenu
   559     |m specialMenu labels selectors|
   559     |m specialMenu labels selectors shorties|
   560 
   560 
   561     labels :=    #(
   561     labels :=    #(
   562                     'scavenge'
   562                     'scavenge'
   563                     'tenure'
   563                     'tenure'
   564                     'hi prio incremental collect'
   564                     'hi prio incremental collect'
   565                     '-'
   565                     '-'
   566                     'cleanup memory'
   566                     'cleanup memory'
   567                     'flush method history'
   567                     'flush method history'
       
   568                     'unload autoloaded classes'
   568                     '-'
   569                     '-'
   569                     'compress sources'
   570                     'compress sources'
   570                   ).
   571                   ).
   571     selectors := #(
   572     selectors := #(
   572                     scavenge
   573                     scavenge
   573                     tenure
   574                     tenure
   574                     incrementalCollect
   575                     incrementalCollect
   575                     nil
   576                     nil
   576                     cleanupMemory
   577                     cleanupMemory
   577                     cleanupMethodHistory
   578                     cleanupMethodHistory
       
   579                     unloadAllAutoloadedClasses
   578                     nil
   580                     nil
   579                     compressSources
   581                     compressSources
   580                   ).
   582                   ).
   581 
   583 
   582     specialMenu := PopUpMenu
   584     specialMenu := PopUpMenu
   636                         resetStatisticValues
   638                         resetStatisticValues
   637                         nil
   639                         nil
   638                         otherMenu
   640                         otherMenu
   639                       ).
   641                       ).
   640     ].
   642     ].
       
   643 
       
   644     shorties := #(
       
   645                     nil
       
   646                     nil
       
   647                     nil
       
   648                     nil
       
   649                     nil
       
   650                     nil
       
   651                     nil
       
   652                     nil
       
   653                     #'Ctrl'
       
   654                  ).
       
   655 
   641     m := PopUpMenu labels:(resources array:labels)
   656     m := PopUpMenu labels:(resources array:labels)
   642                    selectors:selectors.
   657                    selectors:selectors
       
   658                    accelerators:shorties.
   643 
   659 
   644     m subMenuAt:#otherMenu put:specialMenu.
   660     m subMenuAt:#otherMenu put:specialMenu.
   645     ^ m
   661     ^ m
   646 
   662 
   647     "Modified: 21.1.1997 / 00:20:27 / cg"
   663     "Modified: 27.6.1997 / 14:45:06 / cg"
   648 !
   664 !
   649 
   665 
   650 realize
   666 realize
   651     super realize.
   667     super realize.
   652     updateBlock notNil ifTrue:[
   668     updateBlock notNil ifTrue:[
   846     "empty the newSpace, by aging all new objects immediately and transfering them
   862     "empty the newSpace, by aging all new objects immediately and transfering them
   847      into oldSpace.
   863      into oldSpace.
   848      (this is for debugging only - the system does this automatically)"
   864      (this is for debugging only - the system does this automatically)"
   849 
   865 
   850     ObjectMemory tenure
   866     ObjectMemory tenure
       
   867 !
       
   868 
       
   869 unloadAllAutoloadedClasses
       
   870     "unload all classes which were autoloaded and have no instances"
       
   871 
       
   872     Autoload loadedClasses copy do:[:anAutoloadedClass |
       
   873         anAutoloadedClass hasInstances ifFalse:[
       
   874             anAutoloadedClass unload
       
   875         ]
       
   876     ].
       
   877 
       
   878     "Created: 27.6.1997 / 14:21:45 / cg"
       
   879     "Modified: 27.6.1997 / 14:22:47 / cg"
   851 ! !
   880 ! !
   852 
   881 
   853 !MemoryMonitor class methodsFor:'documentation'!
   882 !MemoryMonitor class methodsFor:'documentation'!
   854 
   883 
   855 version
   884 version
   856     ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.46 1997-06-26 15:13:13 cg Exp $'
   885     ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.47 1997-06-27 12:45:44 cg Exp $'
   857 ! !
   886 ! !