59 p =
reinterpret_cast<T
>(malloc(
sizeof(*p) * (
unsigned int) n));
61 catch(
const std::bad_alloc&)
68 std::cerr <<
"EMALLC01 malloc: Out of memory - cannot allocate " 69 <<
sizeof(*p) * (
unsigned int) n <<
" bytes" << std::endl;
92 pp =
reinterpret_cast<T
>(realloc(p,
sizeof(*p) * (
unsigned int) n));
94 catch(
const std::bad_alloc&)
101 std::cerr <<
"EMALLC02 realloc: Out of memory - cannot allocate " 102 <<
sizeof(*p) * (
unsigned int) n <<
" bytes" << std::endl;
123 #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.