-
Notifications
You must be signed in to change notification settings - Fork 7
Add support for a reference stable vector. #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0bcf922 to
09970c6
Compare
|
@bjjones FYI. This is a STL-compatible container-only approach to storing linked-data contiguously (was looking to use it for non-residency cases). It's a similar idea to yours but keeps the container separate from allocation (like the STL), so we can swap them out independently. |
|
@bjjones Any concerns? If not, I plan to merge (will be used for Slab Allocation). FYI, I made you owner. You can veto any change. |
bjjones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Code seems fine. Doesn't look like erase()'d spots can be reused, which seems like a big drawback - could end up a lot of fragmentation, but I'm guessing you know that.
Depends where they are. At the end, always reused. In the middle, not so. But I can lower the chunk size to limit waste (full chunks are reclaimable) or just discard those chunks. Not sure what approach is better. |
|
Thanks! |
Adds StableList, a new container type that holds any type of data contiguously when removal mostly occurs at the end.