58 p =
reinterpret_cast<T
>(malloc(
sizeof(*p) * (
unsigned int) n));
60 catch(
const std::bad_alloc&)
67 std::cerr <<
"EMALLC01 malloc: Out of memory - cannot allocate " 68 <<
sizeof(*p) * (
unsigned int) n <<
" bytes" << std::endl;
91 pp =
reinterpret_cast<T
>(realloc(p,
sizeof(*p) * (
unsigned int) n));
93 catch(
const std::bad_alloc&)
100 std::cerr <<
"EMALLC02 realloc: Out of memory - cannot allocate " 101 <<
sizeof(*p) * (
unsigned int) n <<
" bytes" << std::endl;
122 #endif // _SPXALLOC_H_ Exception classes for SoPlex.
Wrapper for different output streams and verbosity levels.
Exception class for out of memory exceptions.This class is derived from the SoPlex exception base cla...
void spx_alloc(T &p, int n=1)
Allocate memory.
Debugging, floating point type and parameter definitions.
void spx_realloc(T &p, int n)
Change amount of allocated memory.
Everything should be within this namespace.
void spx_free(T &p)
Release memory.