#pragma once #include #include static int HeapAllocations = 0; static int HeapDeallocations = 0; void* operator new(std::size_t sz) { HeapAllocations++; return std::malloc(sz); } void operator delete(void* ptr) noexcept { HeapDeallocations++; std::free(ptr); }