NAME
curlglobalinitmem - Global libcurl initialisation with memory call-
backsSYNOPSIS
##iinncclluuddee <
CCUURRLLccooddee ccuurrllgglloobbaalliinniittmmeemm((lloonngg ffllaaggss,, ccuurrllmmaallllooccccaallllbbaacckk mm,, ccuurrllffrreeeeccaallllbbaacckk ff,, ccuurrllrreeaallllooccccaallllbbaacckk rr,, ccuurrllssttrrdduuppccaallllbbaacckk ss,, ccuurrllccaallllooccccaallllbbaacckk cc ));;> DESCRIPTION
This function works exactly as curlglobalinit(3) with one addition: it allows the application to set callbacks to replace the otherwise used internal memory functions. This man page only adds documentation for the callbacks, see thecurlglobalinit(3) man page for all the rest. When you use this func-
tion, all callback arguments must be set to valid function pointers. The prototypes for the given callbacks should match these: void *malloccallback(sizet size); To replace malloc() void freecallback(void *ptr); To replace free() void *realloccallback(void *ptr, sizet size); To replace realloc() char *strdupcallback(const char *str); To replace strdup() void *calloccallback(sizet nmemb, sizet size); To replace calloc() CCAAUUTTIIOONNManipulating these gives considerable powers to the application to sev-
erly screw things up for libcurl. Take care!SEE ALSO
ccuurrllgglloobbaalliinniitt(3), ccuurrllgglloobbaallcclleeaannuupp(3), libcurl 7.12.0 10 May 2004 curlglobalinitmem(3)