#include <stdlib.h>
#include <string.h>
+#include <assert.h>
#include "nsmalloc.h"
#define __NSMALLOC_C
nsmpools[poolid].count--;
VALGRIND_MEMPOOL_FREE(nsmp, nsmp->data);
- free(nsmp);
+
VALGRIND_DESTROY_MEMPOOL(nsmp);
+ free(nsmp);
return;
}
for (nsmp=nsmpools[poolid].blocks;nsmp;nsmp=nnsmp) {
nnsmp=nsmp->next;
VALGRIND_MEMPOOL_FREE(nsmp, nsmp->data);
- free(nsmp);
+
VALGRIND_DESTROY_MEMPOOL(nsmp);
+ free(nsmp);
}
nsmpools[poolid].blocks=NULL;