Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

thread_local_free_list_heap.hpp
Go to the documentation of this file.
1 //
2 // immer: immutable data structures for C++
3 // Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente
4 //
5 // This software is distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
7 //
8 
9 #pragma once
10 
12 
13 namespace immer {
14 namespace detail {
15 
16 template <typename Heap>
18 {
19  struct head_t
20  {
23 
24  ~head_t() { Heap::clear(); }
25  };
26 
27  static head_t& head()
28  {
29  thread_local static head_t head_{nullptr, 0};
30  return head_;
31  }
32 };
33 
34 } // namespace detail
35 
47 template <std::size_t Size, std::size_t Limit, typename Base>
49  detail::thread_local_free_list_storage,
50  Size,
51  Limit,
52  Base>
53 {};
54 
55 } // namespace immer
std::size_t size_t
Definition: bits.hpp:21
Released under the MIT license