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
This commit is contained in:
Jeffrey Czyz 2019-06-06 13:50:17 -07:00 committed by Jack Grigg
parent 3d635dd09f
commit 28825123eb
1 changed files with 5 additions and 1 deletions

View File

@ -27,6 +27,10 @@
#endif #endif
#include <algorithm> #include <algorithm>
#ifdef ARENA_DEBUG
#include <iomanip>
#include <iostream>
#endif
LockedPoolManager* LockedPoolManager::_instance = NULL; LockedPoolManager* LockedPoolManager::_instance = NULL;
std::once_flag LockedPoolManager::init_flag; std::once_flag LockedPoolManager::init_flag;
@ -153,7 +157,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