Questions tagged [jemalloc]

jemalloc is a general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support.

jemalloc is a general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support.

85 questions
3
votes
1 answer

Why does jemalloc memory profile evaluated by jeprof seem to show all memory allocations?

We are trying to track down a memory leak in proxysql (2.0.14) which uses jemalloc (5.2.0). We compiled proxysql with debug symbols enabled. The jemalloc configuration that is baked into proxysql is the…
izzy
  • 358
  • 4
  • 7
3
votes
1 answer

How to check ruby-2.6.3 is using jemalloc ? I installed ruby-2.6.3 as $ rvm install 2.6.3 -C --with-jemalloc

This command should show -ljemalloc but it is not. I could see it with ruby-2.4.3 and ruby-2.5.x but not with ruby-2.6.x $ ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']" -lm …
Vivek
  • 33
  • 1
  • 3
3
votes
0 answers

Unable to interpret jeprof result

After setting up jemalloc and jeprof using configuration in this answer I was able to generate a profiling data. Then using jeprof I was able to generate the report jeprof --show_bytes --gif /usr/bin/java jeprof..*.heap > /tmp/new.gif However…
AbhinavRanjan
  • 1,638
  • 17
  • 21
3
votes
3 answers

How to link jemalloc shared library using cmake

I'm trying to link the jemalloc library into my application at build time using it as a generic implementation. According to https://github.com/jemalloc/jemalloc/wiki/Getting-Started the linking flags to use are: -L`jemalloc-config --libdir`…
Karl Alexius
  • 313
  • 1
  • 6
  • 15
3
votes
1 answer

Get the size of bin per memory allocation in jemalloc

I run a c++ program that uses jemalloc as memory allocator which pre-divides big chunks into small chunks of pre-defined sizes (i.e. 1, 2, 4, 8, ... bytes) Even though I ask 110 bytes of memory allocation, it returns a memory with 128 bytes…
syko
  • 3,477
  • 5
  • 28
  • 51
3
votes
1 answer

Is jemalloc heap profiling tracking allocations only?

I'm trying to solve some memory leaks, and I'm using jemalloc to dump heap profiles: MALLOC_CONF=prof:true,lg_prof_interval:30,lg_prof_sample:17 Works as charm, but I don't know what I'm looking at :) Does jemaloc heap profiling show all (sampled)…
milan
  • 2,355
  • 2
  • 23
  • 38
2
votes
1 answer

Why does jemalloc take more time to allocate 4096 bytes of memory than other SMALL memory?

In the process of testing the performance of jemalloc-5.2.0 to allocate small_class memory, it was found that the memory allocation time of 4096 bytes was significantly higher than that of other small class memory. Is there any special handling for…
HsuehYH
  • 21
  • 1
2
votes
0 answers

jemalloc not showing line numbers of go code with cgo

I am using jemalloc using cgo in Go. I also want to get the heap profiles. Currently, I am getting the profiles, but it does not show the corresponding go code. package main /* #cgo LDFLAGS: /usr/local/lib/libjemalloc.a -L/usr/local/lib…
algod
  • 21
  • 5
2
votes
0 answers

memory allocation change from 4782 to 4783

I've the following code use jemalloc_ctl::{stats, epoch}; use jemallocator; #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; #[actix_rt::main] async fn main() -> std::io::Result<()> { let my_structs =…
allevo
  • 844
  • 1
  • 9
  • 20
2
votes
0 answers

Jemalloc output gives the memory address not the actual names

I am using Jemalloc to find out memory allocation of my application. I exactly follow the steps described here:https://docs.tibco.com/pub/bwce/2.4.5/doc/html/GUID-231E1EFC-EA7C-4072-B0F4-0D92093D3161.html. When I check the output using jeprof…
codemaster001
  • 183
  • 1
  • 16
2
votes
3 answers

Ruby 2.6.5 with jemalloc

I've built and installed rub 2.6.5 from source with jemalloc. However when I check to see if its there I'm not seeing an entry. Is there something else I should have been doing? ubuntu:~$ uname -a Linux ip-10-0-3-198 4.15.0-1032-aws #34-Ubuntu SMP…
Lloyd Watkin
  • 485
  • 4
  • 10
2
votes
1 answer

Setting MALLOC_CONF environmental variable for jemalloc within C program is not working

I am trying to use jemalloc for memory profiling, due to some reason i don't have control of parent process, So instead of setting MALLOC_CONF env variable outside, i am trying to set the variable within the program, but seems its not working. I…
Ronin Goda
  • 234
  • 5
  • 13
2
votes
2 answers

'Linking CXX executable worldserver' fails

Linking CXX executable worldserver at 99% compiling after cmake already pre-compiled fails. [ 99%] Linking CXX executable worldserver /usr/bin/ld: ../../../deps/jemalloc/libjemalloc.a(jemalloc.c.o): relocation R_X86_64_32S against symbol…
2
votes
1 answer

Spring boot application not using jemalloc

I am trying to find out a memory leak issue. I am following this article and trying to use jemalloc The steps followed are: export LD_PRELOAD=/usr/local/lib/libjemalloc.so export MALLOC_CONF=prof:true,lg_prof_interval:30,lg_prof_sample:17 sudo java…
AbhinavRanjan
  • 1,638
  • 17
  • 21
1
vote
0 answers

Unable to Trace Python Function Calls in Jemalloc Heap Profiling

I am using jemalloc for memory profiling in Python code. I'm having difficulty tracing back to my Python function calls. When analyzing the heap profile generated by jemalloc, it only shows C API calls related to the Python interpreter but does not…