aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocate.cpp
blob: 72b1f873abe54af3e802ed64fc298d974ae76773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*************************************************
* Allocator Factory Source File                  *
* (C) 1999-2006 The Botan Project                *
*************************************************/

#include <botan/allocate.h>
#include <botan/libstate.h>

namespace Botan {

/*************************************************
* Get an allocator                               *
*************************************************/
Allocator* get_allocator(const std::string& type)
   {
   Allocator* alloc = global_state().get_allocator(type);
   if(alloc)
      return alloc;

   throw Exception("Couldn't find an allocator to use in get_allocator");
   }

}