diff --git a/luzer/counters.c b/luzer/counters.c index 68d1ebb..ba32e69 100644 --- a/luzer/counters.c +++ b/luzer/counters.c @@ -31,26 +31,11 @@ int counter_index_registered = 0; // Maximum number of counters and pctable entries that may be reserved and also // the number that are allocated. int max_counters = 0; -// Counter Allocations. These are allocated once, before __sanitize_... are -// called and can only be deallocated by test_only_reset_counters. +// Counter Allocations. These are allocated once, +// before __sanitize_... are called. unsigned char* counters = NULL; struct PCTableEntry* pctable = NULL; -NO_SANITIZE void -test_only_reset_counters(void) { - if (counters) { - munmap(counters, max_counters); - counters = NULL; - } - if (pctable) { - munmap(pctable, max_counters); - pctable = NULL; - } - max_counters = 0; - counter_index = 0; - counter_index_registered = 0; -} - NO_SANITIZE int reserve_counters(int counters) { int ret = counter_index;