_TidyAllocatorVtbl Struct Reference

#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)


Detailed Description

An allocator's function table. All functions here must be provided.


Member Function Documentation

void *TIDY_CALL * _TidyAllocatorVtbl::alloc ( TidyAllocator * self,
size_t nBytes )
 

Called to allocate a block of nBytes of memory

void *TIDY_CALL * _TidyAllocatorVtbl::realloc ( TidyAllocator * self,
void * block,
size_t nBytes )
 

Called to resize (grow, in general) a block of memory. Must support being called with NULL.

_TidyAllocatorVtbl::void ( TIDY_CALL * panic )
 

Called to free a previously allocated block of memory

_TidyAllocatorVtbl::void ( TIDY_CALL * panic )
 

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.


The documentation for this struct was generated from the following file:
Generated at Thu Sep 23 15:57:28 2010 for HTML Tidy by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001