Install curl-7.19.5.tar.bz2
[msysgit/bosko.git] / mingw / share / man / man3 / curl_global_init_mem.3
blob57ae6aeeac602e52d1f808d7c839f04a50bdb4d3
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\"
4 .TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
5 .SH NAME
6 curl_global_init_mem - Global libcurl initialisation with memory callbacks
7 .SH SYNOPSIS
8 .B #include <curl/curl.h>
9 .nf
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 ");"
16 .SH DESCRIPTION
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
19 memory functions.
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);"
27 To replace malloc()
28 .IP "void free_callback(void *ptr);"
29 To replace free()
30 .IP "void *realloc_callback(void *ptr, size_t size);"
31 To replace realloc()
32 .IP "char *strdup_callback(const char *str);"
33 To replace strdup()
34 .IP "void *calloc_callback(size_t nmemb, size_t size);"
35 To replace calloc()
36 .SH "CAUTION"
37 Manipulating these gives considerable powers to the application to severly
38 screw things up for libcurl. Take care!
39 .SH "SEE ALSO"
40 .BR curl_global_init "(3), "
41 .BR curl_global_cleanup "(3), "