|
Data Structures |
struct | TableRow |
| TableRow. More...
|
Defines |
#define | AllocA(type) needMem(sizeof(type)) |
| Shortcut to allocating a variable on heap of a specific type.
|
#define | AllocVar(pt) (pt = needMem(sizeof(*pt))) |
| Shortcut to allocating a single variable on the heap and assigning pointer to it.
|
#define | CloneVar(pt) cloneMem(pt, sizeof((pt)[0])) |
| Allocate copy of a structure.
|
Functions |
void * | cloneMem (void *pt, size_t size) |
| Allocate a new buffer of given size, and copy pt to it.
|
void | freeMem (void *pt) |
| Free memory will check for null before freeing.
|
void | freez (void *ppt) |
| Free pointer and set it to NULL.
|
void * | needLargeMem (size_t size) |
| Request a large block of memory.
|
void * | needLargeMemResize (void *vp, size_t size) |
| Adjust memory size on a block, possibly relocating it.
|
void * | needLargeZeroedMem (size_t size) |
| Request a large block of memory and zero it.
|
void * | needLargeZeroedMemResize (void *vp, size_t oldSize, size_t newSize) |
| Adjust memory size on a block, possibly relocating it.
|
void * | needMem (size_t size) |
| Request a block of memory.
|
Texta | readList (char *fileName) |
| Read a list from a file.
|
Array | readTable (char *fileName, char *delimiter) |
| Read a table from a file.
|
void | reverseBytes (char *bytes, long length) |
| Reverse the order of the bytes.
|
void | zeroBytes (void *vpt, int count) |
| Fill a specified area of memory with zeroes.
|
void* needLargeZeroedMemResize |
( |
void * |
vp, |
|
|
size_t |
oldSize, |
|
|
size_t |
newSize | |
|
) |
| | |
Adjust memory size on a block, possibly relocating it.
If vp is NULL, a new memory block is allocated. If block is grown, new memory is zeroed.
Definition at line 96 of file common.c.