0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CellCacheAllocator.h
Go to the documentation of this file.
1 /* -*- c++ -*-
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 
20 #ifndef HYPERTABLE_CELLCACHE_ALLOCATOR_H
21 #define HYPERTABLE_CELLCACHE_ALLOCATOR_H
22 
24 
25 namespace Hypertable {
26 
28  void *allocate(size_t sz);
29  void freed(size_t sz);
30 };
31 
33 
34 template <typename T, class Impl = PageArenaAllocator<T, CellCacheArena> >
35 struct CellCacheAllocator : Impl {
36  template <typename U>
38  : Impl(other) {}
39 
40  template <typename U>
42 
44  CellCacheAllocator(CellCacheArena &arena) : Impl(arena) {}
45 };
46 
47 } // namespace Hypertable
48 
49 #endif /* HYPERTABLE_CELLCACHE_ALLOCATOR_H */
A memory allocator using std::malloc() and std::free().
Definition: PageArena.h:52
PageArenaAllocator< U, CellCacheArena > other
PageArena memory allocator for STL classes.
The PageArenaAllocator is a STL allocator based on PageArena.
CellCacheAllocator(CellCacheArena &arena)
PageArena< uint8_t, CellCachePageAllocator > CellCacheArena
Hypertable definitions
CellCacheAllocator(const PageArenaAllocator< U, CellCacheArena > &other)