Commit Graph

5 Commits

Author SHA1 Message Date
David Drysdale f1bcfa1122 api: Allow injection of user-specified malloc/free functions
Add a new ares_library_init_mem() initialization function for the
library which allows the library user to specify their own malloc,
realloc & free equivalents for use library-wide.

Store these function pointers in library-wide global variables,
defaulting to libc's malloc(), realloc() and free().

Change all calls to malloc, realloc and free to use the function pointer
instead.  Also ensure that ares_strdup() is always available
(even if the local environment includes strdup(3)), and change the
library code to always use it.

Convert calls to calloc() to use ares_malloc() + memset
2016-02-02 10:05:07 +00:00
Daniel Stenberg 63627fa5ab remove all $Id$ lines 2010-03-27 19:42:02 +01:00
Yang Tse a82a8fbf82 Renamed c-ares setup.h to ares_setup.h 2009-11-02 11:55:53 +00:00
Yang Tse 4f4bbc63a6 change CRLF into LF line endings 2008-09-12 05:08:18 +00:00
Yang Tse 797372b0f4 strdup() clone for systems/configurations which lack it 2008-09-11 04:02:49 +00:00