You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, arrays are never freed. I first thought it was reasonable (heap locations allocated by mutable variables where never freed either, and the (reasonable) idea was to imagine that we had a GC), but if we start having heap-heavy tests like linked lists it would make sense to start thinking of freeing heap-allocated arrays.
We could have a free x instruction that would deallocate the array memory, but then other people that would have the array value at hand would fail on access. There is no really nice semantics there. I would be inclined to just have accesses/assignments to freed arrays get stuck; we could also have a valid(x) operator that returns true if the array still exists, and try to speculatively remove these tests.
The text was updated successfully, but these errors were encountered:
Right now, arrays are never freed. I first thought it was reasonable (heap locations allocated by mutable variables where never freed either, and the (reasonable) idea was to imagine that we had a GC), but if we start having heap-heavy tests like linked lists it would make sense to start thinking of freeing heap-allocated arrays.
We could have a
free x
instruction that would deallocate the array memory, but then other people that would have the array value at hand would fail on access. There is no really nice semantics there. I would be inclined to just have accesses/assignments to freed arrays get stuck; we could also have avalid(x)
operator that returnstrue
if the array still exists, and try to speculatively remove these tests.The text was updated successfully, but these errors were encountered: