From ea0dceb55de1f8d0b8cf979a03cffa2c40fb76f9 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Fri, 8 Jun 2012 09:48:46 +0200 Subject: [PATCH] bugfix: do not switch off standard memory strategy when performing a forced GC PLEASE CHECK if your peer has standard memory switched on! --- htroot/PerformanceMemory_p.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.java index 0f71c23c0..ef6f6505f 100644 --- a/htroot/PerformanceMemory_p.java +++ b/htroot/PerformanceMemory_p.java @@ -61,11 +61,12 @@ public class PerformanceMemory_p { if (post.containsKey("gc")) { System.gc(); prop.put("gc", "1"); + } else { + MemoryControl.setSimulatedShortStatus(post.containsKey("simulatedshortmemory")); + final boolean std = post.containsKey("useStandardmemoryStrategy"); + env.setConfig("memory.standardStrategy", std); + MemoryControl.setStandardStrategy(std); } - MemoryControl.setSimulatedShortStatus(post.containsKey("simulatedshortmemory")); - final boolean std = post.containsKey("useStandardmemoryStrategy"); - env.setConfig("memory.standardStrategy", std); - MemoryControl.setStandardStrategy(std); } prop.put("simulatedshortmemory.checked", MemoryControl.getSimulatedShortStatus() ? 1 : 0);