path: root/ares_library_init.3
diff options
Diffstat (limited to 'ares_library_init.3')
1 files changed, 14 insertions, 5 deletions
diff --git a/ares_library_init.3 b/ares_library_init.3
index 797476b..4734f92 100644
--- a/ares_library_init.3
+++ b/ares_library_init.3
@@ -19,11 +19,14 @@
ares_library_init \- c-ares library initialization
-.B #include <ares.h>
-.B int ares_library_init(int \fIflags\fP)
-.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))
@@ -51,6 +54,12 @@ ORing the values together. In normal operation you should specify
\fIARES_LIB_INIT_ALL\fP. Don't use any other value unless you are
familiar with it and trying to control some internal c-ares feature.
+.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, \fIfree(3)\fP and
.B This function is not thread safe.
You have to call it once the program has started, but this call must be done
before the program starts any other thread. This is required to avoid