llist: replace Curl_llist_alloc with Curl_llist_init

No longer allocate the curl_llist head struct for lists separately.

Removes 17 (15%) tiny allocations in a normal "curl localhost" invoke.

closes #1381
This commit is contained in:
Daniel Stenberg 2017-04-03 10:32:43 +02:00
parent a68ca63d73
commit e60fe20fdf
18 changed files with 214 additions and 310 deletions

View file

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2017, 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
@ -44,7 +44,7 @@ typedef size_t (*comp_function) (void *key1,
typedef void (*curl_hash_dtor)(void *);
struct curl_hash {
struct curl_llist **table;
struct curl_llist *table;
/* Hash function to be used for this hash table */
hash_function hash_func;