MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlMemSetup

Function xmlMemSetup

ThirdParty/libxml2/vtklibxml2/xmlmemory.c:464–481  ·  view source on GitHub ↗

* xmlMemSetup: * @freeFunc: the free() function to use * @mallocFunc: the malloc() function to use * @reallocFunc: the realloc() function to use * @strdupFunc: the strdup() function to use * * Override the default memory access functions with a new set * This has to be called before any other libxml routines ! * * Should this be blocked if there was already some allocations * done ? *

Source from the content-addressed store, hash-verified

462 * Returns 0 on success
463 */
464int
465xmlMemSetup(xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc,
466 xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc) {
467 if (freeFunc == NULL)
468 return(-1);
469 if (mallocFunc == NULL)
470 return(-1);
471 if (reallocFunc == NULL)
472 return(-1);
473 if (strdupFunc == NULL)
474 return(-1);
475 xmlFree = freeFunc;
476 xmlMalloc = mallocFunc;
477 xmlMallocAtomic = mallocFunc;
478 xmlRealloc = reallocFunc;
479 xmlMemStrdup = strdupFunc;
480 return(0);
481}
482
483/**
484 * xmlMemGet:

Callers 5

xmllintMainFunction · 0.85
initializeLibxml2Function · 0.85
initializeLibxml2Function · 0.85
thread_specific_dataFunction · 0.85
initializeLibxml2Function · 0.85

Calls

no outgoing calls

Tested by 2

initializeLibxml2Function · 0.68
thread_specific_dataFunction · 0.68