Hi
I started using jemalloc to profile one Java program and I had some
difficulty getting it working.
My sample Java program is very simple.
int[][] array = new int[1 << 20][];
for (int i = 0; i < array.length; i++) {
array[i] = new int[1 << 10];
}
What it does is to create an higher order array of size 1M, and for each
slot, create an integer array of size 1K. So in total it should allocate 1M
* 1K * 4 byte = 4G memory.
I profiled the Java with jemalloc with the following options,
export
MALLOC_CONF="prof:true,lg_prof_interval:30,lg_prof_sample:10,prof_prefix:/tmp/jeprof.out"
My understanding is jemalloc should be able to dump a file each time 1G is
allocated, at a sampling frequency of 1K allocation. However, I never see
any dump file automatically generated.
My jemalloc should be installed correctly b/c I can see memory dump file
generated with the following option.
export MALLOC_CONF="prof:true,prof_final:true,prof_prefix:/tmp/jeprof.out"
Is there anything I am missing or misusing jemalloc?
Chen
_______________________________________________
jemalloc-discuss mailing list
[email protected]
http://www.canonware.com/mailman/listinfo/jemalloc-discuss