blob: 531133ca6a6e9e1d16c7a11896e901bd12b2861e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// file : xsde/cxx/allocator.cxx
// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
#include <xsde/cxx/config.hxx>
#include <xsde/cxx/allocator.hxx>
namespace xsde
{
namespace cxx
{
#ifdef XSDE_EXCEPTIONS
void*
alloc (size_t n)
{
void* p = xsde_alloc (n);
if (p == 0)
throw std::bad_alloc ();
return p;
}
#endif
}
}
|