curlglobalinitmem(3) libcurl Manual curlglobalinitmem(3)
NAME
curlglobalinitmem - Global libcurl initialisation with memory call-
backs
SYNOPSIS
##include <>
CURLcode curlglobalinitmem(long flags,,
curlmalloccallback m,,
curlfreecallback f,,
curlrealloccallback r,,
curlstrdupcallback s,,
curlcalloccallback c );;
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 the
curlglobalinit(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()
CAUTION
Manipulating these gives considerable powers to the application to sev-
erly screw things up for libcurl. Take care!
SEE ALSO
curlglobalinit(3), curlglobalcleanup(3),
libcurl 7.12.0 10 May 2004 curlglobalinitmem(3)
|