Thrill  0.1
manager.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * thrill/mem/manager.cpp
3  *
4  * Part of Project Thrill - http://project-thrill.org
5  *
6  * Copyright (C) 2015 Timo Bingmann <[email protected]>
7  *
8  * All rights reserved. Published under the BSD-2 license in the LICENSE file.
9  ******************************************************************************/
10 
11 #include <thrill/common/logger.hpp>
12 #include <thrill/mem/manager.hpp>
13 
14 #include <cstdio>
15 
16 namespace thrill {
17 namespace mem {
18 
20  // You can not use the logger here, because there is maybe no
21  // LoggerAllocator any more
22  if (debug) {
23  printf("mem::Manager() name=%s alloc_count_=%zu peak_=%zu total_=%zu\n",
24  name_, alloc_count_.load(), peak_.load(), total_.load());
25  }
26 }
27 
28 Manager g_bypass_manager(nullptr, "Bypass");
29 
30 } // namespace mem
31 } // namespace thrill
32 
33 /******************************************************************************/
const char * name_
description for output
Definition: manager.hpp:67
Manager g_bypass_manager
global bypass memory manager
std::atomic< size_t > alloc_count_
number of allocation
Definition: manager.hpp:76
std::atomic< size_t > peak_
peak allocation
Definition: manager.hpp:73
Object shared by allocators and other classes to track memory allocations.
Definition: manager.hpp:28
static constexpr bool debug
Definition: manager.hpp:30
std::atomic< size_t > total_
total allocation
Definition: manager.hpp:70