diff options
author | lloyd <[email protected]> | 2008-11-08 20:02:45 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-08 20:02:45 +0000 |
commit | 39f29e53a346eed9671a108b6aa59eb78b1dc084 (patch) | |
tree | 7a94faf449795858707efc3a010b6d3d6b6a5e23 /src/alloc | |
parent | c0e3dc424479a09f9e320625d64d230cc952b22b (diff) |
Move allocate.h with related code in alloc
Diffstat (limited to 'src/alloc')
-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 |