Fundamental our current strategy for tracking VM size is extremely error prone. The Allocator methods .grow and shrink are poor and slows ways to attempt to capture resizing for structures that are simply not owned by the VM.
I think we should approach this in a few steps.
- Remove
.grow and .shrink and stop pretending that we are actually capturing heap resizing for collections outside the stack
- Replace usages of boxed slices with the existing GcArray
- Create replacements for
Vec, HashSet and HashMap. It will be easier to correctly track size by simply preventing resizing instead requesting it from the GC.
Fundamental our current strategy for tracking VM size is extremely error prone. The
Allocatormethods.growandshrinkare poor and slows ways to attempt to capture resizing for structures that are simply not owned by the VM.I think we should approach this in a few steps.
.growand.shrinkand stop pretending that we are actually capturing heap resizing for collections outside the stackVec,HashSetandHashMap. It will be easier to correctly track size by simply preventing resizing instead requesting it from the GC.