--- a/ObjectMemory.st Wed Apr 16 23:44:06 2014 +0200
+++ b/ObjectMemory.st Thu Apr 17 00:07:55 2014 +0200
@@ -2492,49 +2492,49 @@
"/ its not useful, to run it more than once
"/
BackgroundCollectProcess notNil ifTrue:[
- BackgroundCollectProcess priority:aPriority.
- ^ self
+ BackgroundCollectProcess priority:aPriority.
+ ^ self
].
p :=
- [
- [
- |myDelay timeOfLastGC doGC|
-
- myDelay := Delay forSeconds:5.
- timeOfLastGC := Timestamp now.
-
- [true] whileTrue:[
- doGC := self gcStepIfUseful.
- doGC ifFalse:[
- (BackgroundCollectMaximumInterval notNil
- and:[(Timestamp now getSeconds - timeOfLastGC getSeconds) > BackgroundCollectMaximumInterval])
- ifTrue:[
+ [
+ [
+ |myDelay timeOfLastGC doGC|
+
+ myDelay := Delay forSeconds:5.
+ timeOfLastGC := Timestamp now.
+
+ [true] whileTrue:[
+ doGC := self gcStepIfUseful.
+ doGC ifFalse:[
+ (BackgroundCollectMaximumInterval notNil
+ and:[(Timestamp now secondDeltaFrom: timeOfLastGC) > BackgroundCollectMaximumInterval])
+ ifTrue:[
"/ 'ObjectMemory [info]: start time-triggered background collect.' infoPrintCR.
- doGC := true.
- ]
- ].
-
- doGC ifTrue:[
- "/
- "/ perform a full cycle (finish cycle)
- "/
- [self gcStep] whileFalse:[].
- "/
- "/ increase oldSpace, if freeSpace is below limits.
- "/
- self moreOldSpaceIfUseful.
- timeOfLastGC := Timestamp now.
- ].
- "/
- "/ wait a bit
- "/
- myDelay wait.
- ]
- ] ifCurtailed:[
- BackgroundCollectProcess := nil
- ]
- ] newProcess.
+ doGC := true.
+ ]
+ ].
+
+ doGC ifTrue:[
+ "/
+ "/ perform a full cycle (finish cycle)
+ "/
+ [self gcStep] whileFalse:[].
+ "/
+ "/ increase oldSpace, if freeSpace is below limits.
+ "/
+ self moreOldSpaceIfUseful.
+ timeOfLastGC := Timestamp now.
+ ].
+ "/
+ "/ wait a bit
+ "/
+ myDelay wait.
+ ]
+ ] ifCurtailed:[
+ BackgroundCollectProcess := nil
+ ]
+ ] newProcess.
p name:'background collector'.
p priority:aPriority.
p restartable:true.
@@ -5554,11 +5554,11 @@
!ObjectMemory class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.275 2014-04-11 14:00:49 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.276 2014-04-16 22:07:55 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.275 2014-04-11 14:00:49 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.276 2014-04-16 22:07:55 cg Exp $'
!
version_SVN