We use the custom chunk allocators to manage network-registered memory. A network-registration event returns a "key" that must be used with future network DMA operations. Right now, we store these keys out-of-place and look them up as necessary.
It would be really convenient for us if we could store the key (16 bytes at the moment) as part of the jemalloc chunk metadata at the base of each chunk or out-of-place for large allocations, and retrieve it using jemalloc's fast internal address masking or lookup.
An interface like id = JE_CURRENT_CHUNK(), je_chunk_set_user_data(chunk_id id, void *data, size_t size), and void *je_chunk_get_user_data(chunk_id id) would save us a lot of work for tracking this information.
A bounded size for user data would be fine.
This is simply a feature request to go along with the custom chunk allocation infrastructure.
We use the custom chunk allocators to manage network-registered memory. A network-registration event returns a "key" that must be used with future network DMA operations. Right now, we store these keys out-of-place and look them up as necessary.
It would be really convenient for us if we could store the key (16 bytes at the moment) as part of the jemalloc chunk metadata at the base of each chunk or out-of-place for large allocations, and retrieve it using jemalloc's fast internal address masking or lookup.
An interface like
id = JE_CURRENT_CHUNK(),je_chunk_set_user_data(chunk_id id, void *data, size_t size), andvoid *je_chunk_get_user_data(chunk_id id)would save us a lot of work for tracking this information.A bounded size for user data would be fine.
This is simply a feature request to go along with the custom chunk allocation infrastructure.