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
Completely remove chunksInUse and build it only when we need it (e.g. inside GC::Collect). This structure can be created in O(N), because we need to iterate over all chunks inside current arena starting from the first one. Note that the complexity is really O(N) even considering the fact that we need O(NlogN) to create a map. This works because we are iterating over chunks in a sorted order. Thus it is possible to provide chunksInUse.end() as a hint for insert method
Using binary search find closest deallocated chunk inside chunkTreap. Starting from this chunk iterate in the right direction to find if we have required chunk or not.
chunksInUse
and build it only when we need it (e.g. inside GC::Collect). This structure can be created in O(N), because we need to iterate over all chunks inside current arena starting from the first one. Note that the complexity is really O(N) even considering the fact that we need O(NlogN) to create a map. This works because we are iterating over chunks in a sorted order. Thus it is possible to provide chunksInUse.end() as a hint for insert methodComplete #29 before fixing this one
The text was updated successfully, but these errors were encountered: