Browse Source

Fix GC calibration

Greg 16 years ago
parent
commit
ee6c7fbf1d
2 changed files with 4 additions and 1 deletions
  1. 3 0
      gmsrc/doc/ChangeLog.txt
  2. 1 1
      gmsrc/src/gm/gmMachine.cpp

+ 3 - 0
gmsrc/doc/ChangeLog.txt

@@ -355,3 +355,6 @@ o Changing gm version format from vMajor.Minor.BetaLetter to vMajor.Minor.Build.
 
 
 04/02/10
 04/02/10
 o Changed new to GM_NEW in gmCodeGen.cpp for consistency.  Thanks Sunray.
 o Changed new to GM_NEW in gmCodeGen.cpp for consistency.  Thanks Sunray.
+
+15/03/10
+o Fix GC auto calibration. Thanks DrEvil.

+ 1 - 1
gmsrc/src/gm/gmMachine.cpp

@@ -1289,7 +1289,7 @@ bool gmMachine::CollectGarbage(bool a_forceFullCollect)
         {
         {
           // We ran out of memory because we needed more than our limit, so increase limit
           // We ran out of memory because we needed more than our limit, so increase limit
           int newHard = (int)(GMMACHINE_GC_HARD_MEM_INC_FRAC_OF_USED * (float)afterMemUsage);
           int newHard = (int)(GMMACHINE_GC_HARD_MEM_INC_FRAC_OF_USED * (float)afterMemUsage);
-          int newSoft = (int)(GMMACHINE_GC_SOFT_MEM_DEFAULT_FRAC_OF_HARD * (float)GetDesiredByteMemoryUsageHard());
+          int newSoft = (int)(GMMACHINE_GC_SOFT_MEM_DEFAULT_FRAC_OF_HARD * (float)newHard);
 
 
           if( !GMMACHINE_AUTOMEMALLOWSHRINK )
           if( !GMMACHINE_AUTOMEMALLOWSHRINK )
           {
           {