aboutsummaryrefslogtreecommitdiff
path: root/lib/memdebug.c
AgeCommit message (Collapse)Author
2011-08-20MemoryTracking: adjust initialization callingYang Tse
Calling of curl_memdebug() was still done with a pending free()
2011-08-17MemoryTracking: adjust curl_domalloc() and curl_dofree() memory fillingYang Tse
Until 2011-08-17 libcurl's Memory Tracking feature also performed automatic malloc and free filling operations using 0xA5 and 0x13 values. Our own preinitialization of dynamically allocated memory might be useful when not using third party memory debuggers, but on the other hand this would fool memory debuggers into thinking that all dynamically allocated memory is properly initialized. As a default setting, libcurl's Memory Tracking feature no longer performs preinitialization of dynamically allocated memory on its own. If you know what you are doing, and really want to retain old behavior, you can achieve this compiling with preprocessor symbols CURL_MT_MALLOC_FILL and CURL_MT_FREE_FILL defined with appropriate values.
2011-08-16MemoryTracking: make curl_docalloc() call calloc() avoiding our zero fillYang Tse
2011-07-29socketpair() usage tracking to allow fd leak detectionYang Tse
2011-07-26stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.hYang Tse
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-02-22fix socket data type and logging format in debug tracking socket functionsYang Tse
2010-02-21fix compiler warningYang Tse
2010-02-20fix compiler warningYang Tse
2010-01-18Constantine Sapuntzakis enhancements to make memory tracking log file writingYang Tse
of messages atomic, on systems where an fwrite of a memory buffer is atomic.
2009-11-18Fix compiler warning: ISO C90 forbids mixed declarations and codeYang Tse
2009-11-18Make memory tracking system intolerant with zero sized malloc(),Yang Tse
calloc() and realloc() function calls.
2009-10-29Fix compiler warning: control reaches end of non-void functionYang Tse
2009-10-28Since the NSS lib closes the socket the memory tracking system wrongly gets aDaniel Stenberg
false positive on a leaked socket, so this introduces a way to tell the system that the socket is indeed closed without explicitly closing it!
2009-05-02Use build-time configured curl_socklen_t instead of socklen_tYang Tse
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2009-04-21remove unnecessary typecastYang Tse
2008-10-23Really old gcc doesn't like parenthesis around the names of functions thatDan Fandrich
don't have prototypes. They didn't serve any useful purpose here, anyway.
2008-09-13Disable tracking of fdopen() calls in the low-level memory leak trackingYang Tse
code when fdopen() is not available, to avoid compiler error.
2008-09-13remove dead code portion inoperative long time agoYang Tse
2008-09-04fix print formatting string directivesYang Tse
2008-05-14Move the CURLDEBUG check after setup.h so it can be set there if necessary.Dan Fandrich
2007-11-07if () => if()Daniel Stenberg
while () => while() and some other minor re-indentings
2007-08-08Fix getsockname argument typePatrick Monnerat
Improve "universal" alignment type in struct memdebug
2007-06-28Using fdopen() is a more correct way to implement the CURLOPT_NEW_FILE_PREMSJames Housley
file.c, but the debug interface was missing. This adds the routines needed to make the memory debuging work for fdopen().
2007-05-15Added call to setvbuf (disabled by default for speed) to flush theDan Fandrich
memdebug log file after every line and avoid losing the last few log entries if curl crashes.
2007-02-21curlassert macro replaced with DEBUGASSERT macro defined in setup_once.hYang Tse
2007-02-16use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handlingYang Tse
2006-11-05Prevent multiple initialization of memdebug configuration variables.Yang Tse
This was possible on debug c-ares enabled builds when both CURL_MEMDEBUG and CARES_MEMDEBUG environment variables were set. Leading to a file handle leak even when both variables had the same value, and wierd test suite results when different.
2005-06-30use %p to printf pointers since %x doesn't work properly on tru64 for thisDaniel Stenberg
(and besides, we should be using the same %-code for all pointers)
2005-03-31Updated the copyright year since changes have been this year.Daniel Stenberg
2004-10-13Set errno = ENOMEM on faild countcheck().Gisle Vanem
2004-06-24Source cleanups. The major one being that we now _always_ use a Curl_addrinfoDaniel Stenberg
linked list for name resolved data, even on hosts/systems with only IPv4 stacks as this simplifies a lot of code.
2004-05-11curl_global_init_mem() allows the memory functions to be replaced.Daniel Stenberg
memory.h is included everywhere for this.
2004-05-05Gisle fixed: don't reference 'mem' if it's NULL.Daniel Stenberg
2004-05-05make the memlimit final NULL return get written to stderr as wellaDaniel Stenberg
2004-03-08store size as size_tDaniel Stenberg
use %zd when outputting size_t
2004-02-26Gisle Vanem's added support calloc()-debugging and outputting mode forDaniel Stenberg
fopen() as well.
2004-02-20Some compilers warn on completely empty source files, we provide a blankDaniel Stenberg
one to prevent that.
2004-02-18Made curl_accept() take a 'void *' instead of 'socklen_t *' in the 3rdDaniel Stenberg
argument to also not force the casual includer to know about the socklen_t type.
2004-02-18Modified curl_accept() to take a 'void *' in the 2nd argument instead ofDaniel Stenberg
sockaddr *. This has the added benefit that source files that include memdebug.h doesn't have to know about "sockaddr".
2004-02-16Make realloc() support NULL as pointer. Made to allow us to use these routinesDaniel Stenberg
to memdebug the ares stuff as well.
2004-01-29Dan Fandrich's cleanup patch to make pedantic compiler options cause lessDaniel Stenberg
warnings. Minor edits by me.
2004-01-07updated year in the copyright stringDaniel Stenberg
2003-12-16use the curlassert() instead of custom checksDaniel Stenberg
2003-11-13don't log failed socket() callsDaniel Stenberg
2003-10-14Gisle Vanem's IPv6-on-Windows patch applied!Daniel Stenberg
2003-08-14allow out-of-memory testing by setting a limit. That number of memoryDaniel Stenberg
allocation calls will succeed, the following will return NULL!
2003-06-26use CURLDEBUG instead of MALLOCDEBUG for preprocessor conditionsDaniel Stenberg
2003-01-29removed the local variables for emacs and vim, use the new sample.emacsDaniel Stenberg
way for emacs, and vim users should provide a similar non-polluting style