1 .\" You can view this file with:
4 .TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
6 curl_global_init_mem - Global libcurl initialisation with memory callbacks
8 .B #include <curl/curl.h>
10 .B "CURLcode curl_global_init_mem(long " flags,
11 .B " curl_malloc_callback "m,
12 .B " curl_free_callback "f,
13 .B " curl_realloc_callback "r,
14 .B " curl_strdup_callback "s,
15 .B " curl_calloc_callback "c ");"
17 This function works exactly as \fIcurl_global_init(3)\fP with one addition: it
18 allows the application to set callbacks to replace the otherwise used internal
21 This man page only adds documentation for the callbacks, see the
22 \fIcurl_global_init(3)\fP man page for all the rest. When you use this
23 function, all callback arguments must be set to valid function pointers.
25 The prototypes for the given callbacks should match these:
26 .IP "void *malloc_callback(size_t size);"
28 .IP "void free_callback(void *ptr);"
30 .IP "void *realloc_callback(void *ptr, size_t size);"
32 .IP "char *strdup_callback(const char *str);"
34 .IP "void *calloc_callback(size_t nmemb, size_t size);"
37 Manipulating these gives considerable powers to the application to severly
38 screw things up for libcurl. Take care!
40 .BR curl_global_init "(3), "
41 .BR curl_global_cleanup "(3), "