ich auf einem Klon der malloc (3)
Funktionen arbeite (malloc
, realloc
und free
jetzt).Individuelle Allocator: Valgrind zeigt 7 Allocs, 0 frees, keine Lecks
Ich möchte Unterstützung für Valgrind hinzufügen. Ich verwende these docs. Nachdem jedoch Anrufe an die VALGRIND_MEMPOOL_FREE
, VALGRIND_MEMPOOL_ALLOC
und VALGRIND_CREATE_MEMPOOL
Makros hinzufügen, ich folgendes von Valgrind erhalten:
==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
Dies ist trotz meiner realloc
calling VALGRIND_MEMPOOL_FREE
und meine free
calling VALGRIND_MEMPOOL_FREE
.
Was könnte die Ursache dafür sein?
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) und [https://bugs.kde.org/show_bug]. cgi? id = 233298] (https://bugs.kde.org/show_bug.cgi?id=233298). – 4566976