monotone

monotone Mtn Source Tree

Root/botan/allocate.h

1/*************************************************
2* Allocator Header File *
3* (C) 1999-2007 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_ALLOCATOR_H__
7#define BOTAN_ALLOCATOR_H__
8
9#include <botan/types.h>
10#include <string>
11
12namespace Botan {
13
14/*************************************************
15* Allocator Interface *
16*************************************************/
17class Allocator
18 {
19 public:
20 static Allocator* get(bool);
21
22 virtual void* allocate(u32bit) = 0;
23 virtual void deallocate(void*, u32bit) = 0;
24
25 virtual std::string type() const = 0;
26
27 virtual void init() {}
28 virtual void destroy() {}
29
30 virtual ~Allocator() {}
31 };
32
33}
34
35#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status