From b0722b9ed623edd20a3b12d65f1f1c8398c5cb09 Mon Sep 17 00:00:00 2001 From: hogoww Date: Fri, 25 Feb 2022 22:12:40 +0100 Subject: [PATCH] Mutant #575, Reverting [ Replace #and: with #nand: ] on method [ attemptToShrink ] 9/10 Test Cases are NOT EQUIVALENT --- smalltalksrc/VMMaker/SpurMemoryManager.class.st | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/smalltalksrc/VMMaker/SpurMemoryManager.class.st b/smalltalksrc/VMMaker/SpurMemoryManager.class.st index cec7fbd979..134b6d0857 100644 --- a/smalltalksrc/VMMaker/SpurMemoryManager.class.st +++ b/smalltalksrc/VMMaker/SpurMemoryManager.class.st @@ -2674,16 +2674,13 @@ 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 nand: [ - 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 }