--- a/MemoryMonitor.st Sat Jan 18 16:26:25 1997 +0100
+++ b/MemoryMonitor.st Tue Jan 21 00:21:09 1997 +0100
@@ -559,7 +559,7 @@
labels := #(
'scavenge'
'tenure'
- 'incremental collect'
+ 'hi prio incremental collect'
'-'
'cleanup memory'
'flush method history'
@@ -585,34 +585,64 @@
^ specialMenu
].
- labels := #(
- 'collect garbage'
- 'collect garbage & symbols'
- 'collect garbage & compress'
- '-'
- 'background collect'
- '-'
- 'reset statistic values'
- '-'
- 'others'
- ).
+ ObjectMemory backgroundCollectorRunning ifFalse:[
+ labels := #(
+ 'collect garbage'
+ 'collect garbage & symbols'
+ 'collect garbage & compress'
+ '-'
+ 'background collect now'
+ 'start background collector'
+ '-'
+ 'reset statistic values'
+ '-'
+ 'others'
+ ).
- selectors := #(
- garbageCollect
- garbageCollectAndSymbols
- compressingGarbageCollect
- nil
- backgroundCollect
- nil
- resetStatisticValues
- nil
- otherMenu
- ).
+ selectors := #(
+ garbageCollect
+ garbageCollectAndSymbols
+ compressingGarbageCollect
+ nil
+ backgroundCollect
+ restartBackgroundCollector
+ nil
+ resetStatisticValues
+ nil
+ otherMenu
+ ).
+ ] ifTrue:[
+ labels := #(
+ 'collect garbage'
+ 'collect garbage & symbols'
+ 'collect garbage & compress'
+ '-'
+ 'background collect'
+ '-'
+ 'reset statistic values'
+ '-'
+ 'others'
+ ).
+
+ selectors := #(
+ garbageCollect
+ garbageCollectAndSymbols
+ compressingGarbageCollect
+ nil
+ backgroundCollect
+ nil
+ resetStatisticValues
+ nil
+ otherMenu
+ ).
+ ].
m := PopUpMenu labels:(resources array:labels)
selectors:selectors.
m subMenuAt:#otherMenu put:specialMenu.
^ m
+
+ "Modified: 21.1.1997 / 00:20:27 / cg"
!
realize
@@ -786,6 +816,20 @@
"Created: 7.11.1995 / 17:44:59 / cg"
!
+restartBackgroundCollector
+ "start a background (non disturbing) incremental GC.
+ Since the GC is performed at a low priority, it may not make progress if higher
+ prio processes are running"
+
+ ObjectMemory backgroundCollectorRunning
+ ifFalse:[
+ ObjectMemory startBackgroundCollectorAt:5.
+ ObjectMemory startBackgroundCollectorAt:5
+ ]
+
+ "Created: 21.1.1997 / 00:09:30 / cg"
+!
+
scavenge
"perform a blocking newspace garbage collect.
(this is for debugging only - the system does this automatically)"
@@ -804,5 +848,5 @@
!MemoryMonitor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.39 1996-11-07 18:43:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.40 1997-01-20 23:21:09 cg Exp $'
! !