The docker image intended for debugging native memory leaks.
Configure Java to use jemalloc using LD_PRELOAD.
LD_PRELOAD="/usr/local/lib/libjemalloc.so"Enable profiling using MALLOC_CONF.
MALLOC_CONF="prof_leak:true,prof:true,lg_prof_interval:25,lg_prof_sample:18,prof_prefix:/tmp/jeprof"Use jeprof to produce a text report or a nice graph over the allocations – eventually the leak should stand out.
jeprof --svg /tmp/jeprof.* > jeprof-report.svgjeprof --text /tmp/jeprof.* > jeprof.logdocker run -ti --rm aukhatov/centos-jemalloc:8u191b09