ThingWorx Edge C SDK > Porting to Another Platform > Memory Management Functions
Memory Management Functions
The SDK uses dynamic memory allocation and de-allocation. In all but the most basic of platforms, this means the use of the standard C malloc, calloc, and free functions. The SDK does not use realloc itself, but any underlying TLS library may. To create an abstraction layer, the SDK uses #defines to give you the flexibility of creating your own implementations of these functions. These definitions, which are required, and their most basic implementations are as follows:
#define TW_MALLOC(a) malloc(a)
#define TW_CALLOC(a, b) calloc(a,b)
#define TW_REALLOC(a, b) realloc(a, b)
#define TW_FREE(a) free(a)