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

Question: Allocation of RecordBuffer in shared memory context #16

Open
ningvin opened this issue May 29, 2020 · 0 comments
Open

Question: Allocation of RecordBuffer in shared memory context #16

ningvin opened this issue May 29, 2020 · 0 comments

Comments

@ningvin
Copy link

ningvin commented May 29, 2020

I am trying to use the hash table in a scenario where the hash table and its records are placed in a fixed size, pre-allocated chunk of shared memory accessed by multiple processes. Allocations in this chunk of shared memory would be managed by a custom allocator.

Adding a key-value pair to a hash table via WritableHashTable::Add causes WritableHashTable::CreateRecordBuffer to be called internally, which allocates a buffer of sufficient size. As far as I can see the allocation does not happen in the critical section of the Add method, thus the custom allocator mentioned above would have to take care of executing these allocations serially.

The README mentions a shared memory implementation, but it is unclear to me how far this shared memory implementation has progressed.
Am I missing something here or is making the custom allocator "multiprocess aware" the only option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant