0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
StlAllocator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 3
9  * of the License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Hypertable. If not, see <http://www.gnu.org/licenses/>
18  */
19 
24 #ifndef HYPERTABLE_STL_ALLOCATOR_H
25 #define HYPERTABLE_STL_ALLOCATOR_H
26 
27 #include "PageArenaAllocator.h"
28 
29 namespace Hypertable {
30 
36 
40 template <typename T, class Impl = PageArenaAllocator<T, StlArena> >
41 struct StlAllocator : Impl {
42  template <typename U>
44  : Impl(other) {}
45 
46  template <typename U>
48 
50  StlAllocator(StlArena &arena) : Impl(arena) {}
51 };
52 
55 } // namespace Hypertable
56 
57 #endif /* HYPERTABLE_STL_ALLOCATOR_H */
PageArena memory allocator for STL classes.
The PageArenaAllocator is a STL allocator based on PageArena.
PageArenaAllocator< U, StlArena > other
Definition: StlAllocator.h:47
StlAllocator(StlArena &arena)
Definition: StlAllocator.h:50
Stl compatible memory allocator based on a PageArena.
Definition: StlAllocator.h:41
The PageArena allocator is simple and fast, avoiding individual mallocs/frees.
Definition: PageArena.h:69
Hypertable definitions
StlAllocator(const PageArenaAllocator< U, StlArena > &other)
Definition: StlAllocator.h:43
PageArena< uint8_t, DefaultPageAllocator > StlArena
Definition: StlAllocator.h:35