diff options
Diffstat (limited to 'src/alloc/allocate.h')
-rw-r--r-- | src/alloc/allocate.h | 35 |
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 |