Skip to content

Commit

Permalink
Mutant pharo-project#565, Installing [ Replace #+ with #- ] on method…
Browse files Browse the repository at this point in the history
… [ attemptToShrink ] 10 test cases.
  • Loading branch information
hogoww committed Feb 25, 2022
1 parent 7f651d6 commit 9f9eeba
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions smalltalksrc/VMMaker/SpurMemoryManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2674,13 +2674,16 @@ SpurMemoryManager >> atLeastClassIndexHalfHeader: obj [
{ #category : #'growing/shrinking memory' }
SpurMemoryManager >> attemptToShrink [
"Attempt to shrink memory after successfully reclaiming lots of memory.
If there's enough memory to shrink then be sure to attept to shrink by
at least growHeaqdroom because segments are typically of that size."
(totalFreeOldSpace > shrinkThreshold
and: [totalFreeOldSpace > growHeadroom
and: [segmentManager shrinkObjectMemory: (totalFreeOldSpace - growHeadroom max: growHeadroom)]]) ifTrue:
[statShrinkMemory := statShrinkMemory + 1]
(totalFreeOldSpace > shrinkThreshold and: [
totalFreeOldSpace > growHeadroom and: [
segmentManager shrinkObjectMemory:
(totalFreeOldSpace - growHeadroom max: growHeadroom) ] ])
ifTrue: [ statShrinkMemory := statShrinkMemory - 1 ]
]
{ #category : #accessing }
Expand Down

0 comments on commit 9f9eeba

Please sign in to comment.