aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc/alloc_mmap/mmap_mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc/alloc_mmap/mmap_mem.h')
-rw-r--r--src/alloc/alloc_mmap/mmap_mem.h28
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