If initial slots is set, then during a minor GC, if we have allocatable pages but the heap is mostly full, then we will set grow_heap to true since total_slots does not count allocatable pages so it will be less than init_slots. This can cause allocatable_pages to grow to much higher than desired since it will appear that the heap is mostly full.
Fix growth in minor GC when we have initial slots
If initial slots is set, then during a minor GC, if we have allocatable
pages but the heap is mostly full, then we will set
grow_heapto truesince
total_slotsdoes not count allocatable pages so it will be lessthan
init_slots. This can causeallocatable_pagesto grow to muchhigher than desired since it will appear that the heap is mostly full.