Implement a hash map that lives in shared memory, with a custom allocator
commit32b64c649ecb5d2833d05b3987c44f408f0ede3a
authorHenri Verroken <hverr@fb.com>
Thu, 2 Sep 2021 07:45:30 +0000 (2 00:45 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 2 Sep 2021 08:28:26 +0000 (2 01:28 -0700)
tree5f75a50812cd1476b932938c286396250ce689a7
parent82e5f7b54ee3586d72c9bd64de10ab0f0b39bb48
Implement a hash map that lives in shared memory, with a custom allocator

Summary:
Implement a hash map that lives in shared memory, using a dedicated bump allocator to allocate memory.

- We use hashbrown's `HashMap` as the underlying hash map implemention.
- The underlying allocator is a simple bump allocator which allocates chunks of 10 MiB from an underlying file allocator (introduced in a previous diff)

Reviewed By: mjhostet

Differential Revision: D30069850

fbshipit-source-id: 72d20fc93f923232cba1d5e9580fcda72d93cefd
hphp/hack/src/shmrs/Cargo.toml
hphp/hack/src/shmrs/hashmap.rs [new file with mode: 0644]
hphp/hack/src/shmrs/mapalloc.rs [new file with mode: 0644]
hphp/hack/src/shmrs/mod.rs