Scippy

SoPlex

Sequential object-oriented simPlex

spxalloc.h File Reference

Memory allocation routines. More...

#include <iostream>
#include <stdlib.h>
#include <assert.h>
#include "soplex/spxdefines.h"
#include "soplex/spxout.h"
#include "soplex/exceptions.h"

Go to the source code of this file.

Namespaces

 soplex
 Everything should be within this namespace.
 

Functions

Memory allocation routines

Here we have cover functions for malloc/realloc/free, to make sure that we allays succeed. Otherwise an exception is thrown.

We use templates to get the types right, otherwise casts would have been neccessary.

template<class T >
void spx_alloc (T &p, int n=1)
 Allocate memory. More...
 
template<class T >
void spx_realloc (T &p, int n)
 Change amount of allocated memory. More...
 
template<class T >
void spx_free (T &p)
 Release memory. More...
 

Detailed Description

Memory allocation routines.

Definition in file spxalloc.h.