Fix compilation errors in support/lockedpool.cpp

Changes in #12048 cause a compilation error in Arena::walk() when
ARENA_DEBUG is defined. Specifically, Arena's chunks_free map was
changed to have a different value type.

Additionally, missing includes cause other compilation errors when
ARENA_DEBUG is defined.

Reproduced with:

make CPPFLAGS=-DARENA_DEBUG
pull/16161/head
Jeffrey Czyz 6 years ago
parent 80fdb6fad1
commit ad71548822

@ -23,6 +23,10 @@
#endif #endif
#include <algorithm> #include <algorithm>
#ifdef ARENA_DEBUG
#include <iomanip>
#include <iostream>
#endif
LockedPoolManager* LockedPoolManager::_instance = nullptr; LockedPoolManager* LockedPoolManager::_instance = nullptr;
std::once_flag LockedPoolManager::init_flag; std::once_flag LockedPoolManager::init_flag;
@ -149,7 +153,7 @@ void Arena::walk() const
printchunk(chunk.first, chunk.second, true); printchunk(chunk.first, chunk.second, true);
std::cout << std::endl; std::cout << std::endl;
for (const auto& chunk: chunks_free) for (const auto& chunk: chunks_free)
printchunk(chunk.first, chunk.second, false); printchunk(chunk.first, chunk.second->first, false);
std::cout << std::endl; std::cout << std::endl;
} }
#endif #endif

Loading…
Cancel
Save