sto lavorando un clone delle malloc (3)
funzioni (malloc
, realloc
e free
per ora).allocatore personalizzato: Valgrind mostra 7 Allocati, 0 frees, Nessuna perdita
Vorrei aggiungere supporto per Valgrind. Sto usando these docs. Tuttavia, dopo aver aggiunto le chiamate ai VALGRIND_MEMPOOL_FREE
, VALGRIND_MEMPOOL_ALLOC
e VALGRIND_CREATE_MEMPOOL
macro, ottengo il seguente da Valgrind:
==22303== HEAP SUMMARY:
==22303== in use at exit: 0 bytes in 0 blocks
==22303== total heap usage: 7 allocs, 0 frees, 2,039 bytes allocated
==22303==
==22303== All heap blocks were freed -- no leaks are possible
Questo nonostante la mia e la mia realloc
calling VALGRIND_MEMPOOL_FREE
free
calling VALGRIND_MEMPOOL_FREE
.
Quale potrebbe essere la causa di questo?
See [http://valgrind.10908.n7.nabble.com/VALGRIND-MEMPOOL-FREE-not-reflected-in-heap-summary-td42789.html ] (http://valgrind.10908.n7.nabble.com/VALGRIND-MEMPOOL-FREE-not-reflected-in-heap-summary-td42789.html) e [https://bugs.kde.org/show_bug. cgi? id = 233.298] (https://bugs.kde.org/show_bug.cgi?id=233298). – 4566976