Template Class Malloc¶
Defined in File Malloc.hxx
Class Documentation¶
-
template<typename T>
class Utils::Malloc¶
-
Class manafin memory allocation.
Public Functions
-
void allocate(size_t n)¶
-
Allocate memory for
nobjects, raise an error if memory already allocated.
-
void reallocate(size_t n)¶
-
Allocate memory for
nobjects, no matter if already allocated.
-
inline void free(void)¶
-
Free memory without deallocating pointer.
-
void hard_free(void)¶
-
Free memory deallocating pointer.
-
inline size_t size(void) const¶
-
Number of objects allocated.
-
inline bool is_empty() const¶
-
trueif you cannot get more memory pointers.
-
void must_be_empty(char const *const where) const¶
-
return an error if memory is not completely used.
-
void allocate(size_t n)¶