mercredi 22 février 2023

why does bcc memleak lose malloc information

I'm using bcc-memleak to locate memory leak in my project. But the top command shows that the VIRT increase from 100GB to 200GB and RES from 70GB to 90GB in 10-hours, while memleak shows that only 150MB not released.

I compile project with "-O2 -fno-omit-frame-pointer" and I got almost every call-stack with outstanding allocations.

memleak command is : memleak -p {pid} -o 30000 -T 10 20

bcc & memleak project: https://github.com/iovisor/bcc/blob/master/tools/memleak.py

use std malloc and jemalloc have the same result.

Anyone know how to get more information? or other tools recommend to check memleak.

I have tried jemalloc with prof, but it needs too much cpu and memory, so it didn't solve my problem.

Aucun commentaire:

Enregistrer un commentaire