#include <tidy.h>
Public Methods | |
void* TIDY_CALL* | alloc (TidyAllocator *self, size_t nBytes) |
void* TIDY_CALL* | realloc (TidyAllocator *self, void *block, size_t nBytes) |
void (TIDY_CALL *free)(TidyAllocator *self, void *block) | |
void (TIDY_CALL *panic)(TidyAllocator *self, ctmbstr msg) |
|
Called to allocate a block of nBytes of memory |
|
Called to resize (grow, in general) a block of memory. Must support being called with NULL. |
|
Called to free a previously allocated block of memory |
|
Called when a panic condition is detected. Must support block == NULL. This function is not called if either alloc or realloc fails; it is up to the allocator to do this. Currently this function can only be called if an error is detected in the tree integrity via the internal function CheckNodeIntegrity(). This is a situation that can only arise in the case of a programming error in tidylib. You can turn off node integrity checking by defining the constant NO_NODE_INTEGRITY_CHECK during the build. |