Defines | |
#define | THROW_BAD_ALLOC throw(std::bad_alloc) |
Functions | |
void * | mem_alloc (size_t nbytes) |
allocate memory | |
void * | mem_alloc_clear (size_t nbytes) |
allocate and clear memory | |
void * | mem_change_size (void *, size_t) |
void | mem_free (void *) |
char * | mem_copy_string (const char *arg) |
char * | mem_copy_string (const char *arg, size_t len) |
void * | operator new (size_t nbytes) THROW_BAD_ALLOC |
void * | operator new[] (size_t nbytes) THROW_BAD_ALLOC |
void | operator delete (void *ptr) throw () |
void | operator delete[] (void *ptr) throw () |
void * | operator new (size_t nbytes, std::nothrow_t &) throw () |
void * | operator new[] (size_t nbytes, std::nothrow_t &) throw () |
void | operator delete (void *ptr, std::nothrow_t const &) throw () |
void | operator delete[] (void *ptr, std::nothrow_t const &) throw () |
void* mem_alloc | ( | size_t | nbytes | ) |
allocate memory
mem_alloc uses malloc to allocate the required sized chunk of memory. If any error is returned from malloc() a fatal diagnostic is issued.
nbytes | The size of the memory to allocate. |
void* mem_alloc_clear | ( | size_t | nbytes | ) |
allocate and clear memory
mem_alloc_clear uses malloc to allocate the required sized chunk of memory. If any error is returned from malloc() an fatal diagnostic is issued. The memory is zeroed befor it is returned.
nbytes | The size of the memory to allocate |
void* mem_change_size | ( | void * | , | |
size_t | ||||
) |
char* mem_copy_string | ( | const char * | arg, | |
size_t | len | |||
) |
The mem_copy_string function may be used to copy a string into dynamically allocated memory.
arg | The string to be copied (it is *not* NUL terminated). | |
len | The length of the string to be copied. |
char* mem_copy_string | ( | const char * | arg | ) |
The mem_copy_string function may be used to copy a C string into dynamically allocated memory.
arg | The NUL terminated string to be copied. |
void mem_free | ( | void * | ) |
void operator delete | ( | void * | ptr, | |
std::nothrow_t const & | ||||
) | throw () |
void operator delete | ( | void * | ptr | ) | throw () |
void operator delete[] | ( | void * | ptr, | |
std::nothrow_t const & | ||||
) | throw () |
void operator delete[] | ( | void * | ptr | ) | throw () |
void* operator new | ( | size_t | nbytes, | |
std::nothrow_t & | ||||
) | throw () |
void* operator new | ( | size_t | nbytes | ) |
void* operator new[] | ( | size_t | nbytes, | |
std::nothrow_t & | ||||
) | throw () |
void* operator new[] | ( | size_t | nbytes | ) |