|
|
|
@ -19,12 +19,14 @@ |
|
|
|
|
ares_library_init \- c-ares library initialization |
|
|
|
|
.SH SYNOPSIS |
|
|
|
|
.nf |
|
|
|
|
.B #include <ares.h> |
|
|
|
|
.PP |
|
|
|
|
.B int ares_library_init(int \fIflags\fP) |
|
|
|
|
.B int ares_library_init_mem(int \fIflags\fP, void *(*\fIamalloc\fP)(size_t), void (*\fIafree\fP)(void *)) |
|
|
|
|
.PP |
|
|
|
|
.B cc file.c -lcares |
|
|
|
|
#include <ares.h> |
|
|
|
|
|
|
|
|
|
int ares_library_init(int \fIflags\fP) |
|
|
|
|
|
|
|
|
|
int ares_library_init_mem(int \fIflags\fP, |
|
|
|
|
void *(*\fIamalloc\fP)(size_t), |
|
|
|
|
void (*\fIafree\fP)(void *ptr), |
|
|
|
|
void (*\fIarealloc\fP)(void *ptr, size_t size)) |
|
|
|
|
.fi |
|
|
|
|
.SH DESCRIPTION |
|
|
|
|
.PP |
|
|
|
@ -54,9 +56,9 @@ familiar with it and trying to control some internal c-ares feature. |
|
|
|
|
.PP |
|
|
|
|
The |
|
|
|
|
.B ares_library_init_mem |
|
|
|
|
function allows the caller to provide memory management |
|
|
|
|
functions that the c-ares library will be use instead of \fImalloc(3)\fP and |
|
|
|
|
\fIfree(3)\fP. |
|
|
|
|
function allows the caller to provide memory management functions that the |
|
|
|
|
c-ares library will be use instead of \fImalloc(3)\fP, \fIfree(3)\fP and |
|
|
|
|
\fIrealloc(3)\fP. |
|
|
|
|
.PP |
|
|
|
|
.B This function is not thread safe. |
|
|
|
|
You have to call it once the program has started, but this call must be done |
|
|
|
|