--- a/ObjectMemory.st Wed Apr 07 12:23:50 2004 +0200
+++ b/ObjectMemory.st Wed Apr 07 12:27:55 2004 +0200
@@ -797,6 +797,18 @@
"Modified: 29.1.1997 / 23:44:24 / cg"
!
+verboseCompactingGC
+ "ST80 compatibility; same as verboseGarbageCollect"
+
+ self verboseGarbageCollect
+!
+
+verboseGlobalCompactingGC
+ "ST80 compatibility; same as verboseGarbageCollect"
+
+ self verboseGarbageCollect
+!
+
versionId
"return this systems version.
For ST80 compatibility."
@@ -2248,6 +2260,22 @@
"
!
+nonVerboseGarbageCollect
+ "perform a compressing garbage collect or fallback to non-compressing collect,
+ if required."
+
+ "/ try 1pass baker collect first.
+ "/ this will fail if oldSpace size is above compressLimit
+ (self compressingGarbageCollect) ifFalse:[
+ "/ fallBack - use 2pass inplace compress
+ self compressOldSpace
+ ].
+
+ "
+ ObjectMemory nonVerboseGarbageCollect
+ "
+!
+
reclaimSymbols
"reclaim unused symbols;
Unused symbols are (currently) not reclaimed automatically,
@@ -2421,12 +2449,6 @@
"
!
-verboseCompactingGC
- "ST80 compatibility; same as verboseGarbageCollect"
-
- self verboseGarbageCollect
-!
-
verboseGarbageCollect
"perform a compressing garbage collect and show some informational
output on the Transcript"
@@ -2435,30 +2457,25 @@
nBytesBefore := self oldSpaceUsed.
- "/ try 1pass baker collect first.
- "/ this will fail if oldSpace size is above compressLimit
- (self compressingGarbageCollect) ifFalse:[
- "/ fallBack - use 2pass inplace compress
- self compressOldSpace
- ].
+ self nonVerboseGarbageCollect.
"/ show what we reclaimed
nReclaimed := nBytesBefore - self oldSpaceUsed.
nReclaimed > 0 ifTrue:[
- nReclaimed > 1024 ifTrue:[
- nReclaimed > (1024 * 1024) ifTrue:[
- value := nReclaimed * 10 // (1024 * 1024) / 10.0.
- unit := ' Mb.'
- ] ifFalse:[
- value := nReclaimed // 1024.
- unit := ' Kb.'
- ]
- ] ifFalse:[
- value := nReclaimed.
- unit := ' bytes.'
- ].
- Transcript show:'reclaimed '; show:value.
- Transcript showCR:unit
+ nReclaimed > 1024 ifTrue:[
+ nReclaimed > (1024 * 1024) ifTrue:[
+ value := nReclaimed * 10 // (1024 * 1024) / 10.0.
+ unit := ' Mb.'
+ ] ifFalse:[
+ value := nReclaimed // 1024.
+ unit := ' Kb.'
+ ]
+ ] ifFalse:[
+ value := nReclaimed.
+ unit := ' bytes.'
+ ].
+ Transcript show:'reclaimed '; show:value.
+ Transcript showCR:unit
]
"
@@ -2466,12 +2483,6 @@
"
"Modified: / 15.7.1998 / 13:28:05 / cg"
-!
-
-verboseGlobalCompactingGC
- "ST80 compatibility; same as verboseGarbageCollect"
-
- self verboseGarbageCollect
! !
!ObjectMemory class methodsFor:'garbage collector control'!
@@ -5055,7 +5066,7 @@
!ObjectMemory class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.211 2004-03-20 15:37:20 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.212 2004-04-07 10:27:55 werner Exp $'
! !
ObjectMemory initialize!