|
VAT
3.0
Video Analysis Tool
|
Memory allocation. More...
#include <stdlib.h>Go to the source code of this file.
Typedefs | |
| typedef char *(* | GAAllocFunc) (size_t, int) |
| typedef void(* | GAFreeFunc) (char *) |
Functions | |
| void | GA_set_alloc_funcs (GAAllocFunc allocFunc, GAFreeFunc freeFunc) |
| char * | GA_alloc (size_t numElem, int eltSize) |
| void | GA_free (char *memLoc) |
Memory allocation.
This module provides memory allocation services to the package. The allocation functions to be used can be set at run-time.
| typedef char*(* GAAllocFunc) (size_t, int) |
Memory allocation function.
This is the specification of the memory allocation function which can be set using GA_set_alloc_funcs.
| typedef void(* GAFreeFunc) (char *) |
Memory freeing function.
This is the specification of the memory freeing function which can be set using GA_set_alloc_funcs.
| char* GA_alloc | ( | size_t | numElem, |
| int | eltSize | ||
| ) |
Allocate memory.
Allocate memory using the currently set allocation function.
| numElem | Number of elements to allocate. |
| eltSize | Element size. |
| void GA_free | ( | char * | memLoc | ) |
Free memory.
Free memory using the currently set freeing function.
| memLoc | Memory location to be freed. |
| void GA_set_alloc_funcs | ( | GAAllocFunc | allocFunc, |
| GAFreeFunc | freeFunc | ||
| ) |
Set allocation functions.
Set the memory allocation functions to be used.
| allocFunc | Allocation function. |
| freeFunc | Freeing function. |
1.8.11