// file : xsde/cxx/allocator.cxx // author : Boris Kolpackov // copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include #include 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 } }