#define SGEN_MIN_ALLOWANCE_NURSERY_SIZE_RATIO 1.0
#define SGEN_MAX_ALLOWANCE_NURSERY_SIZE_RATIO 10.0
+/*
+ * How much more we allow the heap to grow before triggering another major collection
+ */
+#define SGEN_DEFAULT_ALLOWANCE_HEAP_SIZE_RATIO 0.33
+
/*
* Default ratio of memory we want to release in a major collection in relation to the the current heap size.
*
* We allow the heap to grow by one third its current size before we start the next
* major collection.
*/
- allowance_target = new_heap_size / 3;
+ allowance_target = new_heap_size * SGEN_DEFAULT_ALLOWANCE_HEAP_SIZE_RATIO;
allowance = MAX (allowance_target, MIN_MINOR_COLLECTION_ALLOWANCE);