mirror of
https://github.com/curl/curl.git
synced 2026-06-05 14:54:14 +03:00
If CURLDEBUG defined, call curl_memdebug() if $CARES_MEMDEBUG is set.
This commit is contained in:
parent
c4ad533300
commit
655ec6bf8e
1 changed files with 10 additions and 0 deletions
|
|
@ -93,6 +93,16 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|||
struct server_state *server;
|
||||
struct timeval tv;
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
const char *env = getenv("CARES_MEMDEBUG");
|
||||
|
||||
if (env)
|
||||
curl_memdebug(env);
|
||||
env = getenv("CARES_MEMLIMIT");
|
||||
if (env)
|
||||
curl_memlimit(atoi(env));
|
||||
#endif
|
||||
|
||||
channel = malloc(sizeof(struct ares_channeldata));
|
||||
if (!channel)
|
||||
return ARES_ENOMEM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue