Skip to content

Commit

Permalink
Mutant pharo-project#578, Installing [ Replace #and: with #or: ] on m…
Browse files Browse the repository at this point in the history
…ethod [ attemptToShrink ] 10 test cases.
  • Loading branch information
hogoww committed Feb 25, 2022
1 parent 7ee3e83 commit a2e3d42
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 or: [
segmentManager shrinkObjectMemory:
(totalFreeOldSpace - growHeadroom max: growHeadroom) ] ])
ifTrue: [ statShrinkMemory := statShrinkMemory + 1 ]
]
{ #category : #accessing }
Expand Down

0 comments on commit a2e3d42

Please sign in to comment.