diff --git a/src/detector.cpp b/src/detector.cpp index 7a4296a..923fc09 100644 --- a/src/detector.cpp +++ b/src/detector.cpp @@ -11,7 +11,7 @@ namespace { static std::atomic_bool ready{false}; static thread_local int busy{0}; -static std::vector bins(PAGE_SIZE); +static std::vector bins(PAGE_SIZE); static std::atomic_uint64_t nAllocations{0}; static std::atomic average{0}; diff --git a/src/litterer.cpp b/src/litterer.cpp index 45e45f4..17957d9 100644 --- a/src/litterer.cpp +++ b/src/litterer.cpp @@ -51,8 +51,8 @@ void partial_shuffle(std::vector& v, std::size_t n, Generator& g) { } } -std::vector cumulative_sum(const std::vector& bins) { - std::vector cumsum(bins.size()); +std::vector cumulative_sum(const std::vector& bins) { + std::vector cumsum(bins.size()); std::partial_sum(bins.begin(), bins.end(), cumsum.begin()); return cumsum; } @@ -119,9 +119,9 @@ void runLitterer() { const std::string mallocSourceObject = mallocInfo.dli_fname; #endif - const auto bins = data["Bins"].get>(); - const auto nAllocations = data["NAllocations"].get(); - const auto maxLiveAllocations = data["MaxLiveAllocations"].get(); + const auto bins = data["Bins"].get>(); + const auto nAllocations = data["NAllocations"].get(); + const auto maxLiveAllocations = data["MaxLiveAllocations"].get(); const std::size_t nAllocationsLitter = maxLiveAllocations * multiplier; fprintf(log, "==================================== Litterer ====================================\n"); @@ -135,7 +135,7 @@ void runLitterer() { fprintf(log, "==================================================================================\n"); assert(std::accumulate(bins.begin(), bins.end(), 0zu) == nAllocations); - const std::vector binsCumSum = cumulative_sum(bins); + const std::vector binsCumSum = cumulative_sum(bins); const auto litterStart = std::chrono::high_resolution_clock::now();