aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-08 20:02:45 +0000
committerlloyd <[email protected]>2008-11-08 20:02:45 +0000
commit39f29e53a346eed9671a108b6aa59eb78b1dc084 (patch)
tree7a94faf449795858707efc3a010b6d3d6b6a5e23 /src/alloc
parentc0e3dc424479a09f9e320625d64d230cc952b22b (diff)
Move allocate.h with related code in alloc
Diffstat (limited to 'src/alloc')
-rw-r--r--src/alloc/allocate.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/alloc/allocate.h b/src/alloc/allocate.h
new file mode 100644
index 000000000..efbb77291
--- /dev/null
+++ b/src/alloc/allocate.h
@@ -0,0 +1,35 @@
+/*************************************************
+* Allocator Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_ALLOCATOR_H__
+#define BOTAN_ALLOCATOR_H__
+
+#include <botan/types.h>
+#include <string>
+
+namespace Botan {
+
+/*************************************************
+* Allocator Interface *
+*************************************************/
+class BOTAN_DLL Allocator
+ {
+ public:
+ static Allocator* get(bool);
+
+ virtual void* allocate(u32bit) = 0;
+ virtual void deallocate(void*, u32bit) = 0;
+
+ virtual std::string type() const = 0;
+
+ virtual void init() {}
+ virtual void destroy() {}
+
+ virtual ~Allocator() {}
+ };
+
+}
+
+#endif