67 p =
reinterpret_cast<T
>(malloc(
sizeof(*p) * n));
69 catch(
const std::bad_alloc&)
77 std::cerr <<
"EMALLC01 malloc: Out of memory - cannot allocate "
78 <<
sizeof(*p) * n <<
" bytes" << std::endl;
99 pp =
reinterpret_cast<T
>(realloc(p,
sizeof(*p) * n));
101 catch(
const std::bad_alloc&)
108 std::cerr <<
"EMALLC02 realloc: Out of memory - cannot allocate "
109 <<
sizeof(*p) * n <<
" bytes" << std::endl;
120 assert(p !=
nullptr);
Exception class for out of memory exceptions.
Exception classes for SoPlex.
Everything should be within this namespace.
void spx_realloc(T &p, size_t n)
Change amount of allocated memory.
void spx_free(T &p)
Release memory.
void spx_alloc(T &p, size_t n=1)
Allocate memory.
Debugging, floating point type and parameter definitions.
Wrapper for different output streams and verbosity levels.