]> git.puffer.fish Git - matthieu/frr.git/commit
lib: count total memory allocation per MTYPE
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 8 Aug 2018 14:44:43 +0000 (16:44 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 8 Aug 2018 18:17:55 +0000 (20:17 +0200)
commit602a6584ee4f7c9f881204cc413fab73f18791f0
tree77ff31767a676b1f544b1938065995c285c78ce2
parentfa896a1d807248b8bd3343b77f8668d80de1ec98
lib: count total memory allocation per MTYPE

If malloc_usable_size() or malloc_size() are available, we can count
total usage of a particular MTYPE.  (Without the functions, we don't
know how much to subtract on free.)

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/memory.c
lib/memory.h
lib/memory_vty.c