Go to the source code of this file.
|
#define | GF_ALLOC(v, t, s) |
| C style memory allocation that throws OutOfMemoryException if it fails. More...
|
|
#define | GF_RESIZE(v, t, s) |
| C style memory re-allocation that throws OutOfMemoryException if it fails. More...
|
|
#define GF_ALLOC |
( |
|
v, |
|
|
|
t, |
|
|
|
s |
|
) |
| |
Value:{ \
v = (t*)malloc((s) * sizeof(t)); \
if ((v) == NULL) { \
throw OutOfMemoryException( \
"Out of Memory while allocating buffer for " #t " of size " #s); \
} \
}
C style memory allocation that throws OutOfMemoryException if it fails.
#define GF_RESIZE |
( |
|
v, |
|
|
|
t, |
|
|
|
s |
|
) |
| |
Value:{ \
v = (t*)realloc(v, (s) * sizeof(t)); \
if ((v) == NULL) { \
throw OutOfMemoryException( \
"Out of Memory while resizing buffer for " #t); \
} \
}
C style memory re-allocation that throws OutOfMemoryException if it fails.