Need Help in porting Jemalloc.

Jason Evans jasone at
Tue Jan 19 12:25:33 PST 2016

> On Jan 18, 2016, at 8:35 PM, RajaKishore Sahu <raju.sahu at> wrote:
> I am trying to port Jemalloc to a embedded environment where we have only 40 MB of memory for a subsystem.
> While porting I found that in start up it is consuming almost 38 MB of memory with arena size of 1MB. We spawn around 70 threads in the start up. So we are only 2 MB left for that subsystem. While the system is in run definitely it will ask for more memory, in that case how we are going to satisfy the memory needed by Jemalloc?
> Current allocator consumes around 20 - 22 MB of memory and remaining is used for the system to run.

It sounds to me like you have jemalloc configured to create numerous arenas.  You need to drop the chunk size (256 KiB works fine), and/or decrease the number of arenas (one will work fine unless your app does a lot of large allocation).


More information about the jemalloc-discuss mailing list