diff options
Diffstat (limited to 'botan/src/alloc/allocate.h')
-rw-r--r-- | botan/src/alloc/allocate.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/botan/src/alloc/allocate.h b/botan/src/alloc/allocate.h new file mode 100644 index 0000000..180f2c0 --- /dev/null +++ b/botan/src/alloc/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 |