aboutsummaryrefslogtreecommitdiff
path: root/lib/hash.c
AgeCommit message (Collapse)Author
2012-12-25Curl_hash_clean: OOM handling fixYang Tse
2012-12-07Introducing a new persistent connection caching system using "bundles".Linus Nielsen Feltzing
A bundle is a list of all persistent connections to the same host. The connection cache consists of a hash of bundles, with the hostname as the key. The benefits may not be obvious, but they are two: 1) Faster search for connections to reuse, since the hash lookup only finds connections to the host in question. 2) It lays out the groundworks for an upcoming patch, which will introduce multiple HTTP pipelines. This patch also removes the awkward list of "closure handles", which were needed to send QUIT commands to the FTP server when closing a connection. Now we allocate a separate closure handle and use that one to close all connections. This has been tested in a live system for a few weeks, and of course passes the test suite.
2011-12-25hash.c: fix OOM triggered segfaultYang Tse
2011-10-11OOM handling/cleanup slight adjustmentsYang Tse
2011-10-07libcurl: some OOM handling fixesYang Tse
2011-07-26stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.hYang Tse
2011-06-10unittest: mark all unit tested functionsDaniel Stenberg
With "@unittest: [num]" in the header comment for each tested function. Shows we have a log way to go still...
2011-04-27source cleanup: unify look, style and indent levelsDaniel Stenberg
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2009-11-11- Constantine Sapuntzakis posted bug #2891595Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2891595) which identified how an entry in the DNS cache would linger too long if the request that added it was in use that long. He also provided the patch that now makes libcurl capable of still doing a request while the DNS hash entry may get timed out.
2009-06-10Adjusted to take in account that...Yang Tse
With the curl memory tracking feature decoupled from the debug build feature, CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows: CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug) DEBUGBUILD used for debug enabled specific code (--enable-debug)
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2008-10-27add null-pointer checkYang Tse
2008-10-25add missing header inclusionsYang Tse
2008-10-23moved the Curl_raw_ functions into the new lib/rawstr.c file for easier curlx_Daniel Stenberg
inclusion by the curl tool without colliding with the curl_strequal functions.
2008-10-20remove debug-code which zero-filled some structures before free()ing themYang Tse
2008-10-19oopsYang Tse
2008-10-19attempt to fix or allow further detection of an elusive icc SIGSEGVYang Tse
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2007-11-07if () => if()Daniel Stenberg
while () => while() and some other minor re-indentings
2007-09-27Renamed a few variables to avoid shadowing global declarations.Dan Fandrich
2007-08-29Added lots of constsDan Fandrich
2007-06-26Robert Iakobashvili re-arranged the internal hash code to work with a customDaniel Stenberg
hash function for different hashes, and also expanded the default size for the socket hash table used in multi handles to greatly enhance speed when very many connections are added and the socket API is used.
2006-09-10Added a useful debug function within #if 0. The function makes it easy toDaniel Stenberg
"dump" a hash table which is useful when tracking problems with data stored in one of our hashes.
2006-04-10First curl_multi_socket() commit. Should primarily be considered as an internalDaniel Stenberg
code rearrange to fit the future better.
2005-01-25Use plain structs and not typedef'ed ones in the hash and linked-list code.Daniel Stenberg
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-10Curl_hash_add() was modified to clear up better in case of internal failure.Daniel Stenberg
When failing, it should not tamper at all with the data it was supposed to add to the cache.
2004-05-10better checking that strdup() worksDaniel Stenberg
2004-05-04improved the cleaning up of memory when we fail to resolve names due toDaniel Stenberg
out of memory (thanks to 'runtests.pl -t')
2004-01-07updated year in the copyright stringDaniel Stenberg
2003-12-15make sure that hash_add() has no allocated resources left in case itDaniel Stenberg
returns NULL
2003-09-14Jeff Pohlmeyer did some marvelous debugging to track this one down. We MUSTDaniel Stenberg
NOT free the existing hash entry when we try to add a new one that matches an existing entry. We now instead free the new one, and make the parent function use the old entry's struct instead.
2003-09-05Uses less macros. #ifdef'ed out unused functions. Edited slightly to beDaniel Stenberg
more in the same style as other curl source code. The only actual code change is an added check after a malloc() call.
2003-08-141. check allocsDaniel Stenberg
2. don't leave allocated memory behind when returning error
2003-06-26use CURLDEBUG instead of MALLOCDEBUG for preprocessor conditionsDaniel Stenberg
2003-01-29removed weirdo {{{ and }}} commentsDaniel Stenberg
removed emacs local-variables stuff
2003-01-16copyright year update in the source headerDaniel Stenberg
2002-11-05Curl_resolv() now returns a different struct, and it contains a referenceDaniel Stenberg
counter so that the caller needs to decrease that counter when done with the returned data. If compiled with MALLOCDEBUG I've added some extra checking that the counter is decreased before a handle is closed etc.
2002-09-03updated source code boilerplate/headerDaniel Stenberg
2002-04-27DNC cache prune crash removed, made the name spacing follow the generalDaniel Stenberg
rule: "Curl_" prefix for library-wide private symbols, "curl_" is for exported symbols.
2002-04-17Prune old hostcache entries with each call...Sterling Hughes
This can be optimized a tidbit, but this is a start.
2002-04-13Add protos and change return value of curl_hash_count....Sterling Hughes
2002-04-12Speed up the hash code considerably, removing a bunch of legacy crudSterling Hughes
2002-03-19copyright string (year) updateDaniel Stenberg
2002-02-17Philip Gladstone's 64-bit issues corrected.Daniel Stenberg
Reminder for the future: when we're using malloc() we MUST include <stdlib.h> as otherwise 64bit archs go bananas. Bug report #517687
2002-01-18I wish I could type. Anyway, this proved it is a good habit to put the NULLDaniel Stenberg
on the left side of comparisons...
2002-01-18added typecast for a malloc() return, and added check for NULLDaniel Stenberg
2002-01-07Make cach'ing work with threads now, there are now three cases:Sterling Hughes
- Use a global dns cache (via setting the tentatively named, CURLOPT_DNS_USE_GLOBAL_CACHE option to true) - Use a per-handle dns cache, by default - Use a pooled dns cache when in the "multi" interface