summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b9390e5)
raw | patch | inline | side by side (parent: b9390e5)
author | Yves Mettier <ymettier@free.fr> | |
Mon, 8 Oct 2012 08:53:09 +0000 (10:53 +0200) | ||
committer | Yves Mettier <ymettier@free.fr> | |
Mon, 8 Oct 2012 08:53:09 +0000 (10:53 +0200) |
src/utils_cache.c | patch | blob | history |
diff --git a/src/utils_cache.c b/src/utils_cache.c
index 539545ac607b988b86e4b995fa97d86b89d672fc..fa6e6603ec3e10eedcdc6ea7d56ab64a0b04db6e 100644 (file)
--- a/src/utils_cache.c
+++ b/src/utils_cache.c
size_t number = 0;
size_t size_arrays = 0;
- /* Increment size for the 2 arrays of values
- * Because realloc is time consuming, it's better to
- * realloc by blocks and not by units.
- * To see the difference, set this value to 1.
- *
- * To change this value at compile time:
- * ./configure CPPFLAGS="-DLISTVAL_INCREASE=102400"
- */
-#ifndef LISTVAL_INCREASE
-# define LISTVAL_INCREASE 1024
-#endif
-
int status = 0;
if ((ret_names == NULL) || (ret_number == NULL))
{
/* Handle the "no values" case here, to avoid the error message when
* calloc() returns NULL. */
- pthread_mutex_lock (&cache_lock);
+ pthread_mutex_unlock (&cache_lock);
return (0);
}
ERROR ("uc_get_names: calloc failed.");
sfree (names);
sfree (times);
- pthread_mutex_lock (&cache_lock);
+ pthread_mutex_unlock (&cache_lock);
return (ENOMEM);
}