libcurl Manual curlglobalinitmem(3)
NAME
curlglobalinitmem - Global libcurl initialisation with
memory callbacks
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 function, 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 applica-
tion to severly screw things up for libcurl. Take care!
SEE ALSO
curlglobalinit(3), curlglobalcleanup(3),
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
libcurl 7.12.0 Last change: 10 May 2004 1
libcurl Manual curlglobalinitmem(3)
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcurl
Interface Stability Uncommitted
NOTES
Source for C-URL is available on http:/opensolaris.org.
libcurl 7.12.0 Last change: 10 May 2004 2
|