diff options
-rw-r--r-- | unittests/KDAlloc/randomtest.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/unittests/KDAlloc/randomtest.cpp b/unittests/KDAlloc/randomtest.cpp index 1120ee4e..c78746bb 100644 --- a/unittests/KDAlloc/randomtest.cpp +++ b/unittests/KDAlloc/randomtest.cpp @@ -78,7 +78,17 @@ public: auto choice = std::uniform_int_distribution<std::size_t>( 0, allocations.size() - 1)(rng); #if defined(USE_KDALLOC) + assert(allocator.location_info(allocations[choice].first, 1) == + klee::kdalloc::LocationInfo::LI_AllocatedOrQuarantined); + assert(allocator.location_info(allocations[choice].first, + allocations[choice].second) == + klee::kdalloc::LocationInfo::LI_AllocatedOrQuarantined); allocator.free(allocations[choice].first, allocations[choice].second); + assert(allocator.location_info(allocations[choice].first, 1) == + klee::kdalloc::LocationInfo::LI_Unallocated); + assert(allocator.location_info(allocations[choice].first, + allocations[choice].second) == + klee::kdalloc::LocationInfo::LI_Unallocated); #else free(allocations[choice].first); #endif @@ -152,7 +162,7 @@ int main() { auto start = std::chrono::steady_clock::now(); RandomTest tester; - tester.run(10'000'000); + tester.run(1'000'000); auto stop = std::chrono::steady_clock::now(); std::cout << std::dec |