cucim icon indicating copy to clipboard operation
cucim copied to clipboard

[FEA] Update to use high-performance malloc and memory pool implementation

Open gigony opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

It would be great if we have a foundation for malloc and memory pool implementation.

malloc upgrade

cuCIM C++ implementation currently tries to use a separate call (cucim_malloc()) to abstract malloc functionality.

image

https://github.com/rapidsai/cucim/blob/45cf987e17e22acd84165e3dd3d6bd5ae72e19cd/cpp/src/cache/image_cache_per_process.cpp#L99

memory pool

it currently does not use memory pool for read_region() method and cache.

We can make use of memory pool implementation for that.

Describe the solution you'd like

According to https://lwn.net/SubscriberLink/872869/0e62bba2db51ec7a/, mimalloc(https://github.com/microsoft/mimalloc) seems to be a good candidate. We can also consider other implementations like tcmalloc (https://github.com/google/tcmalloc).

For memory pool, we can exploit PMR(std::pmr::monotonic_buffer_resource) and rmm.

gigony avatar Oct 19 '21 19:10 gigony