aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-03-14 15:36:40 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-03-14 15:36:40 +0100
commit6a353b105a9476635acbf1d9188e6ef9a6596f79 (patch)
tree1c0ab6d45b2414712f79577537254fae14d00c18 /lib
parent0fc73d364e2cf80e801caae3cadfbaa2c0b8cebe (diff)
memdebug: skip logging the limit countdown, fflush when reached
Diffstat (limited to 'lib')
-rw-r--r--lib/memdebug.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 59a0fe982..804b5fa34 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -146,6 +146,7 @@ static bool countcheck(const char *func, int line, const char *source)
/* log to stderr also */
fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
source, line, func);
+ fflush(logfile); /* because it might crash now */
}
SET_ERRNO(ENOMEM);
return TRUE; /* RETURN ERROR! */
@@ -153,10 +154,6 @@ static bool countcheck(const char *func, int line, const char *source)
else
memsize--; /* countdown */
- /* log the countdown */
- if(source)
- curl_memlog("LIMIT %s:%d %ld ALLOCS left\n",
- source, line, memsize);
}