@@ -106,13 +106,13 @@ static int sgCheckInternalOffsetRows = 0;
106106int gInAlloc = false ;
107107
108108// This is recalculated from the other parameters
109- static size_t sWorkingMemorySize = 10 * 1024 *1024 ;
109+ static size_t sWorkingMemorySize = 256 *1024 ;
110110
111111#ifdef HXCPP_GC_MOVING
112112// Just not sure what this shold be
113- static size_t sgMaximumFreeSpace = 1024 *1024 *1024 ;
113+ static size_t sgMaximumFreeSpace = 512 *1024 *1024 ;
114114#else
115- static size_t sgMaximumFreeSpace = 1024 *1024 *1024 ;
115+ static size_t sgMaximumFreeSpace = 512 *1024 *1024 ;
116116#endif
117117
118118
@@ -720,7 +720,7 @@ struct HoleRange
720720hx::QuickVec<struct BlockDataInfo *> *gBlockInfo = 0 ;
721721static int gBlockInfoEmptySlots = 0 ;
722722
723- #define FRAG_THRESH 14
723+ #define FRAG_THRESH 20
724724
725725#define ZEROED_NOT 0
726726#define ZEROED_THREAD 1
@@ -3117,11 +3117,11 @@ void VerifyStackRead(int *inBottom, int *inTop)
31173117
31183118// TODO - work out best size based on cache size?
31193119#ifdef HXCPP_GC_BIG_BLOCKS
3120- static int sMinZeroQueueSize = 4 ;
3121- static int sMaxZeroQueueSize = 16 ;
3120+ static int sMinZeroQueueSize = 4 * 2 ;
3121+ static int sMaxZeroQueueSize = 16 * 2 ;
31223122#else
3123- static int sMinZeroQueueSize = 8 ;
3124- static int sMaxZeroQueueSize = 32 ;
3123+ static int sMinZeroQueueSize = 8 * 2 ;
3124+ static int sMaxZeroQueueSize = 32 * 2 ;
31253125#endif
31263126
31273127#define BLOCK_OFSIZE_COUNT 12
@@ -3205,9 +3205,9 @@ class GlobalAllocator
32053205
32063206 void FreeLarge (void *inLarge)
32073207 {
3208- #ifdef HXCPP_TELEMETRY
3208+ #ifdef HXCPP_TELEMETRY
32093209 __hxt_gc_free_large (inLarge);
3210- #endif
3210+ #endif
32113211
32123212 ((unsigned char *)inLarge)[HX_ENDIAN_MARK_ID_BYTE] = 0 ;
32133213 // AllocLarge will not lock this list unless it decides there is a suitable
@@ -3239,7 +3239,8 @@ class GlobalAllocator
32393239
32403240 // Should we force a collect ? - the 'large' data are not considered when allocating objects
32413241 // from the blocks, and can 'pile up' between smalll object allocations
3242- if ((inSize+mLargeAllocated > mLargeAllocForceRefresh ) && sgInternalEnable)
3242+ size_t newThreshold = mLargeAllocForceRefresh * 1 .5f ;
3243+ if ((inSize+mLargeAllocated > newThreshold) && sgInternalEnable)
32433244 {
32443245 #ifdef SHOW_MEM_EVENTS
32453246 // GCLOG("Large alloc causing collection");
@@ -5184,11 +5185,11 @@ class GlobalAllocator
51845185 }
51855186
51865187
5187- bool isFragged = stats.fragScore > mAllBlocks .size ()*FRAG_THRESH;
5188+ bool isFragged = stats.fragScore > mAllBlocks .size ()*FRAG_THRESH* 1.5 ;
51885189 if (doRelease || isFragged || hx::gAlwaysMove )
51895190 {
5190- if (isFragged && sgTimeToNextTableUpdate>3 )
5191- sgTimeToNextTableUpdate = 3 ;
5191+ if (isFragged && sgTimeToNextTableUpdate>1 )
5192+ sgTimeToNextTableUpdate = 1 ;
51925193 calcMoveOrder ( );
51935194
51945195 // Borrow some blocks to ensuure space to defrag into
@@ -5304,7 +5305,7 @@ class GlobalAllocator
53045305 double filled_ratio = (double )mRowsInUse /(double )(mAllBlocksCount *IMMIX_USEFUL_LINES);
53055306 double after_gen = filled_ratio + (1.0 -filled_ratio)*mGenerationalRetainEstimate ;
53065307
5307- if (after_gen<0.75 )
5308+ if (after_gen<0.85 )
53085309 {
53095310 sGcMode = gcmGenerational;
53105311 }
@@ -5313,7 +5314,8 @@ class GlobalAllocator
53135314 sGcMode = gcmFull;
53145315 // What was I thinking here? This breaks #851
53155316 // gByteMarkID |= 0x30;
5316- }
5317+ sgTimeToNextTableUpdate = 10 ;
5318+ }
53175319
53185320 #ifdef SHOW_MEM_EVENTS
53195321 GCLOG (" filled=%.2f%% + estimate = %.2f%% = %.2f%% -> %s\n " ,
0 commit comments