summaryrefslogtreecommitdiffstats
path: root/old/botan/build/botan/allocate.h
diff options
context:
space:
mode:
Diffstat (limited to 'old/botan/build/botan/allocate.h')
-rw-r--r--old/botan/build/botan/allocate.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/old/botan/build/botan/allocate.h b/old/botan/build/botan/allocate.h
new file mode 100644
index 0000000..180f2c0
--- /dev/null
+++ b/old/botan/build/botan/allocate.h
@@ -0,0 +1,37 @@
+/*
+* Allocator
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#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