UCommon
|
Runtime functions. More...
Go to the source code of this file.
Functions | |
__attribute__ ((visibility("default"))) void cpr_runtime_error(const char *text) = NULL) | |
Function to handle runtime errors. | |
template<typename T > | |
void | freep (T **handle) |
template<typename T > | |
T * | newp (T **handle) |
Variables | |
caddr_t | address |
caddr_t size_t | known |
void * | mem2 |
const char * | s2 |
size_t | size |
uint16_t | v |
Runtime functions.
This includes common runtime library functions we may need portably.
Definition in file cpr.h.
__attribute__ | ( | (visibility("default")) | ) | const = NULL) |
Function to handle runtime errors.
Portable swap code.
Portable memory placement helper function.
Portable memory allocation helper function.
When using the standard C library, runtime errors are handled by a simple abort. When using the stdc++ library with stdexcept, then std::runtime_error will be thrown.
text | of runtime error. |
Handles out of heap error as a runtime error.
size | of memory block to allocate from heap. |
This is used to process "placement" new operators where a new object is constructed over a pre-allocated area of memory. This handles invalid values through runtime error.
size | of object being constructed. |
address | where the object is being placed. |
known | size of the location we are constructing the object in. |
mem1 | to swap. |
mem2 | to swap. |
size | of swap area. |