Skip to content

Question: Allocation of RecordBuffer in shared memory context #16

@ningvin

Description

@ningvin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions