Skip to content
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

Consider use of Polymorphic Memory Resources for memory management. #2099

Open
thorstenhater opened this issue Mar 22, 2023 · 0 comments
Open
Labels
AEP Arbor Enhancement Proposal enhancement

Comments

@thorstenhater
Copy link
Contributor

Polymorphic Memory Resources (PMR) allows us to easily control the allocators behind: string, vector, map, and folks.
That is without incurring a new template argument. However, support is still a bit behind (GCC 9 and Clang 16).

Here's some ideas on why this helpful to us

  • use a per-thread bump allocator for temporaries, these allocate by simply bumping a pointer and get freed in bulk by simply resetting the pointer to the start. As they are per-thread, no synchronisation is needed. This makes for an extremely fast memory manager.
    Use during the following phases:
    • initialization
    • one per epoch to cover sampling
  • A per-thread slab allocator for persistent objects that never gets freed and can be backed by a bump allocator. Example: Cell instances, shared state backing memory.
@thorstenhater thorstenhater added enhancement AEP Arbor Enhancement Proposal labels Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AEP Arbor Enhancement Proposal enhancement
Projects
None yet
Development

No branches or pull requests

1 participant