1curl_global_init_mem(3)         libcurl Manual         curl_global_init_mem(3)
2
3
4

NAME

6       curl_global_init_mem  - Global libcurl initialisation with memory call‐
7       backs
8

SYNOPSIS

10       #include <curl/curl.h>
11       CURLcode curl_global_init_mem(long  flags,
12        curl_malloc_callback  m,
13        curl_free_callback  f,
14        curl_realloc_callback  r,
15        curl_strdup_callback  s,
16        curl_calloc_callback  c );
17

DESCRIPTION

19       This function works exactly as curl_global_init(3) with  one  addition:
20       it  allows  the  application  to set callbacks to replace the otherwise
21       used internal memory functions.
22
23       This man page only  adds  documentation  for  the  callbacks,  see  the
24       curl_global_init(3)  man page for all the rest. When you use this func‐
25       tion, all callback arguments must be set to valid function pointers.
26
27       The prototypes for the given callbacks should match these:
28
29       void *malloc_callback(size_t size);
30              To replace malloc()
31
32       void free_callback(void *ptr);
33              To replace free()
34
35       void *realloc_callback(void *ptr, size_t size);
36              To replace realloc()
37
38       char *strdup_callback(const char *str);
39              To replace strdup()
40
41       void *calloc_callback(size_t nmemb, size_t size);
42              To replace calloc()
43

CAUTION

45       Manipulating these gives considerable powers to the application to sev‐
46       erly screw things up for libcurl. Take care!
47

SEE ALSO

49       curl_global_init(3), curl_global_cleanup(3),
50
51
52
53
54libcurl 7.12.0                    10 May 2004          curl_global_init_mem(3)
Impressum