68 p =
reinterpret_cast<T
>(malloc(
sizeof(*p) * (
unsigned int) n));
70 catch(
const std::bad_alloc&)
78 std::cerr <<
"EMALLC01 malloc: Out of memory - cannot allocate "
79 <<
sizeof(*p) * (
unsigned int) n <<
" bytes" << std::endl;
102 pp =
reinterpret_cast<T
>(realloc(p,
sizeof(*p) * (
unsigned int) n));
104 catch(
const std::bad_alloc&)
111 std::cerr <<
"EMALLC02 realloc: Out of memory - cannot allocate "
112 <<
sizeof(*p) * (
unsigned int) n <<
" bytes" << std::endl;
123 assert(p !=
nullptr);
Exception class for out of memory exceptions.
Exception classes for SoPlex.
Everything should be within this namespace.
void spx_free(T &p)
Release memory.
void spx_alloc(T &p, int n=1)
Allocate memory.
void spx_realloc(T &p, int n)
Change amount of allocated memory.
Debugging, floating point type and parameter definitions.
Wrapper for different output streams and verbosity levels.