Skip to content

Conversation

@bbernhar
Copy link
Contributor

@bbernhar bbernhar commented Jul 28, 2022

Adds StableList, a new container type that holds any type of data contiguously when removal mostly occurs at the end.

@github-actions github-actions bot added Build Changes to build system. Frontend Changes to common or GPU API agnostic code. Test Changes in tests. labels Jul 28, 2022
@bbernhar bbernhar force-pushed the stable_list branch 2 times, most recently from 0bcf922 to 09970c6 Compare July 28, 2022 20:35
@bbernhar bbernhar requested a review from bjjones July 28, 2022 21:35
@bbernhar
Copy link
Contributor Author

@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.

@bbernhar
Copy link
Contributor Author

bbernhar commented Aug 1, 2022

@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.

Copy link
Contributor

@bjjones bjjones left a 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.

@bbernhar
Copy link
Contributor Author

bbernhar commented Aug 1, 2022

Doesn't look like erase()'d spots can be reused

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.

@bbernhar
Copy link
Contributor Author

bbernhar commented Aug 1, 2022

Thanks!

@bbernhar bbernhar enabled auto-merge (squash) August 1, 2022 18:39
@bbernhar bbernhar merged commit e656199 into main Aug 1, 2022
@bbernhar bbernhar deleted the stable_list branch August 1, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Changes to build system. Frontend Changes to common or GPU API agnostic code. Test Changes in tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants