jemalloc

libmtev has some special support available if you are running with the jemalloc
allocator loaded.

Note that if your application isn't directly linked with jemalloc, libmtev will
still notice its presence at run-time if loaded via LD_PRELOAD. So, the following
can be used in conjunction with an operator's force loading of libjemalloc.so

malloc statistics.

Malloc statistics (in JSON) are available at the URL: /mtev/memory.json

Heap Profiling

This will spit back jeprof format heap information which can then be passed
to the jeprof analysis program for further analysis. For example, to show
allocations by source code line, but from a perspective outside of libmtev's use of
SMR (mtev_memory_) and libck's hash tables (ck_hs_), one could run: