realloc stack use under O0 for x86_64

Matthew Hall mhall at
Wed Mar 25 17:47:48 PDT 2015

On Mar 25, 2015, at 11:48 AM, D'Alessandro, Luke K <ldalessa at> wrote:
> When we compile jemalloc for debugging purposes, we see realloc using a 
> large amount of stack space:
> ```asm
> 0000000000070e48 <realloc>:
>   70e48:       55                      push   %rbp
>   70e49:       48 89 e5                mov    %rsp,%rbp
>   70e4c:       53                      push   %rbx
>   70e4d:       48 81 ec 68 62 00 00    sub    $0x6268,%rsp
> ```

I think perhaps we can do a little better on narrowing this down especially 
given you said that it occurs in -O0 mode.

If you dump this code using objdump -C -d -l, it will try to find the file 
name and line number from the debug symbols, and annotate the assembly with 

Can you give it a try and search for the 0x6268 and scroll up from there to 
find the nearest lines of code to the issue?

Apologies if you already tried this and it didn't work. It helped me in the 


More information about the jemalloc-discuss mailing list