Memory allocation statistics: malloc_stats() doesn't print info

Ubuntu 16.04

CLion 2018.3.4

C++ project

I type the command below and get an output that isn't what the malloc_stats() man pages say it should be. Is there another way to get memory allocation statistics with CLion?

(gdb) call malloc_stats()
$4 = -170142400

Expecting something like this.

(gdb) call malloc_stats()
Arena 0:
system bytes     =     135168
in use bytes     =         96
Total (incl. mmap):
system bytes     =     135168
in use bytes     =         96
max mmap regions =          0
max mmap bytes   =          0

 

0

Please sign in to leave a comment.