Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / docs / libcurl / curl_global_init_mem.html
blob055d9dbbc8321108f4c2df029589ca21a1e91ee9
1 <html><head>
2 <title>curl_global_init_mem man page</title>
3 <meta name="generator" content="roffit 0.7">
4 <STYLE type="text/css">
5 P.level0 {
6 padding-left: 2em;
9 P.level1 {
10 padding-left: 4em;
13 P.level2 {
14 padding-left: 6em;
17 span.emphasis {
18 font-style: italic;
21 span.bold {
22 font-weight: bold;
25 span.manpage {
26 font-weight: bold;
29 h2.nroffsh {
30 background-color: #e0e0e0;
33 span.nroffip {
34 font-weight: bold;
35 font-size: 120%;
36 font-family: monospace;
39 p.roffit {
40 text-align: center;
41 font-size: 80%;
43 </STYLE>
44 </head><body>
46 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
47 <p class="level0">curl_global_init_mem - Global libcurl initialisation with memory callbacks <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
48 <p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> <pre>
49 <p class="level0"><span Class="bold">CURLcode curl_global_init_mem(long flags,</span>
50 <span Class="bold"> curl_malloc_callback m,</span>
51 <span Class="bold"> curl_free_callback f,</span>
52 <span Class="bold"> curl_realloc_callback r,</span>
53 <span Class="bold"> curl_strdup_callback s,</span>
54 <span Class="bold"> curl_calloc_callback c );</span>
55 </pre>
56 <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
57 <p class="level0">This function works exactly as <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> with one addition: it allows the application to set callbacks to replace the otherwise used internal memory functions.
58 <p class="level0">This man page only adds documentation for the callbacks, see the <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> man page for all the rest. When you use this function, all callback arguments must be set to valid function pointers.
59 <p class="level0">The prototypes for the given callbacks should match these:
60 <p class="level0"><a name="void"></a><span class="nroffip">void *malloc_callback(size_t size);</span>
61 <p class="level1">To replace malloc()
62 <p class="level0"><a name="void"></a><span class="nroffip">void free_callback(void *ptr);</span>
63 <p class="level1">To replace free()
64 <p class="level0"><a name="void"></a><span class="nroffip">void *realloc_callback(void *ptr, size_t size);</span>
65 <p class="level1">To replace realloc()
66 <p class="level0"><a name="char"></a><span class="nroffip">char *strdup_callback(const char *str);</span>
67 <p class="level1">To replace strdup()
68 <p class="level0"><a name="void"></a><span class="nroffip">void *calloc_callback(size_t nmemb, size_t size);</span>
69 <p class="level1">To replace calloc() <a name="CAUTION"></a><h2 class="nroffsh">CAUTION</h2>
70 <p class="level0">Manipulating these gives considerable powers to the application to severly screw things up for libcurl. Take care! <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
71 <p class="level0"><a class="manpage" href="./curl_global_init.html">curl_global_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_global_cleanup.html">curl_global_cleanup (3)</a> <span Class="manpage"> </span>
72 <p class="level0"><p class="roffit">
73 This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
74 </body></html>