Issue
The start_brk and brk feild of mm_struct have same value for Firefox, which means the heap is empty in Firefox. Does anyone know: Why does Firefox have an empty heap on Linux? Where does malloc go in memory?
Solution
Firefox uses a custom memory allocator, jemalloc. Unless the --enable-dss
option is specified during configuration, this allocator uses only mmap()
, otherwise it uses both sbrk()
and mmap()
. Needless to say, only the brk()
system call will modify the start_brk
and brk
fields of the struct in question.
Answered By - Michael Foukarakis