diff options
author | lloyd <[email protected]> | 2008-09-30 04:46:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-30 04:46:32 +0000 |
commit | 42e3fe73cb63fe92510964d60bfccded65d08c36 (patch) | |
tree | fb77293dfc71b386da6da4fe0f92676b53afc02b /src/alloc/alloc_mmap/mmap_mem.h | |
parent | bd2abf83b8ae1b93f2c8e1875873c1cab9c1e18e (diff) |
Move allocator base code into core/, alloc_mmap to alloc/
Diffstat (limited to 'src/alloc/alloc_mmap/mmap_mem.h')
-rw-r--r-- | src/alloc/alloc_mmap/mmap_mem.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/alloc/alloc_mmap/mmap_mem.h b/src/alloc/alloc_mmap/mmap_mem.h new file mode 100644 index 000000000..740aa9ec6 --- /dev/null +++ b/src/alloc/alloc_mmap/mmap_mem.h @@ -0,0 +1,28 @@ +/************************************************* +* Memory Mapping Allocator Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_MMAP_ALLOCATOR_H__ +#define BOTAN_MMAP_ALLOCATOR_H__ + +#include <botan/mem_pool.h> + +namespace Botan { + +/************************************************* +* Memory Mapping Allocator * +*************************************************/ +class MemoryMapping_Allocator : public Pooling_Allocator + { + public: + MemoryMapping_Allocator(Mutex* m) : Pooling_Allocator(m) {} + std::string type() const { return "mmap"; } + private: + void* alloc_block(u32bit); + void dealloc_block(void*, u32bit); + }; + +} + +#endif |