Managing pinned memory

D'Alessandro, Luke K ldalessa at indiana.edu
Thu May 8 09:00:31 PDT 2014


Hi all,

I’m in the market for a good concurrent allocator to manage a memory region corresponding to pinned network memory for a multithreaded and distributed HPC application. Basically, I’m going to want to do RDMA to objects that are often malloced and freed. The pinning operation is expensive so it is important to amortize it over lots of uses. I’ve written a simple thread-local caching allocator that allows me to pin contiguous blocks when they’re first allocated, and then just use TLS free listing to reuse space, however I don’t really have the resources needed to implement this in a robust way.

Is there any natural way to do this in jemalloc at this time? My gut feeling is that there isn’t, explicitly specifying an arena breaks its caching and there’s not an obvious way to register a callback to run on internal block allocation and freeing (where I could pin/unpin the underlying memory).

If jemalloc doesn’t really support this use case, does anyone know of an efficient, scalable, robust allocator that does?

Thanks,
Luke


More information about the jemalloc-discuss mailing list