Memory Allocation


Typedefs

typedef void *(TIDY_CALL * TidyMalloc )(size_t len)
typedef void *(TIDY_CALL * TidyRealloc )(void *buf, size_t len)
typedef void(TIDY_CALL * TidyFree )(void *buf)
typedef void(TIDY_CALL * TidyPanic )(ctmbstr mssg)

Functions

Bool TIDY_CALL tidySetMallocCall (TidyMalloc fmalloc)
Bool TIDY_CALL tidySetReallocCall (TidyRealloc frealloc)
Bool TIDY_CALL tidySetFreeCall (TidyFree ffree)
Bool TIDY_CALL tidySetPanicCall (TidyPanic fpanic)

Detailed Description

By default, Tidy will use its own wrappers around standard C malloc/free calls. These wrappers will abort upon any failures. If any are set, all must be set. Pass NULL to clear previous setting.

May be used to set environment-specific allocators such as used by web server plugins, etc.


Typedef Documentation

typedef void*(TIDY_CALL * TidyMalloc)(size_t len)
 

Callback for "malloc" replacement

typedef void*(TIDY_CALL * TidyRealloc)(void *buf, size_t len)
 

Callback for "realloc" replacement

typedef void(TIDY_CALL * TidyFree)(void *buf)
 

Callback for "free" replacement

typedef void(TIDY_CALL * TidyPanic)(ctmbstr mssg)
 

Callback for "out of memory" panic state


Function Documentation

Bool TIDY_CALL tidySetMallocCall TidyMalloc  fmalloc  ) 
 

Give Tidy a malloc() replacement

Bool TIDY_CALL tidySetReallocCall TidyRealloc  frealloc  ) 
 

Give Tidy a realloc() replacement

Bool TIDY_CALL tidySetFreeCall TidyFree  ffree  ) 
 

Give Tidy a free() replacement

Bool TIDY_CALL tidySetPanicCall TidyPanic  fpanic  ) 
 

Give Tidy an "out of memory" handler


Generated on Mon Nov 27 23:21:08 2006 for HTML Tidy by  doxygen 1.3.9.1