diff options
Diffstat (limited to 'old/botan/build/botan/mmap_mem.h')
-rw-r--r-- | old/botan/build/botan/mmap_mem.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/old/botan/build/botan/mmap_mem.h b/old/botan/build/botan/mmap_mem.h new file mode 100644 index 0000000..bef166a --- /dev/null +++ b/old/botan/build/botan/mmap_mem.h @@ -0,0 +1,30 @@ +/* +* Memory Mapping Allocator +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_MMAP_ALLOCATOR_H__ +#define BOTAN_MMAP_ALLOCATOR_H__ + +#include <botan/mem_pool.h> + +namespace Botan { + +/* +* Memory Mapping Allocator +*/ +class BOTAN_DLL 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 |