This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch dj/malloc-tcache updated. glibc-2.24-673-g3a93781
- From: dj at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 1 Feb 2017 06:30:38 -0000
- Subject: GNU C Library master sources branch dj/malloc-tcache updated. glibc-2.24-673-g3a93781
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, dj/malloc-tcache has been updated
via 3a93781c77ef510ad60720479b74c8b597d51a55 (commit)
via 8fc36e8a22e61051641f5c7f979f1f9fb07a5a8d (commit)
from 53b383690979db3428371ccf85042f86db3b5615 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a93781c77ef510ad60720479b74c8b597d51a55
commit 3a93781c77ef510ad60720479b74c8b597d51a55
Author: DJ Delorie <dj@delorie.com>
Date: Tue Jan 31 16:23:57 2017 -0500
Fix boundary error
diff --git a/malloc/malloc.c b/malloc/malloc.c
index d19fa03..197fe0c 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1791,7 +1791,7 @@ static struct malloc_par mp_ =
,
.tcache_count = TCACHE_FILL_COUNT,
.tcache_max = TCACHE_IDX,
- .tcache_max_bytes = tidx2usize (TCACHE_IDX),
+ .tcache_max_bytes = tidx2usize (TCACHE_IDX-1),
.tcache_unsorted_limit = 0 /* No limit */
#endif
};
@@ -3632,9 +3632,9 @@ _int_malloc (mstate av, size_t bytes)
#if USE_TCACHE
INTERNAL_SIZE_T tcache_nb = 0;
- if (csize2tidx (nb) <= mp_.tcache_max)
- tcache_nb = nb;
size_t tc_idx = csize2tidx (nb);
+ if (tc_idx < mp_.tcache_max)
+ tcache_nb = nb;
int return_cached = 0;
tcache_unsorted_count = 0;
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8fc36e8a22e61051641f5c7f979f1f9fb07a5a8d
commit 8fc36e8a22e61051641f5c7f979f1f9fb07a5a8d
Author: DJ Delorie <dj@delorie.com>
Date: Mon Jan 30 20:10:18 2017 -0500
Fix tunables conditionals
- Fix ifdef -> if
- Conditionalize tunables hooks
diff --git a/malloc/arena.c b/malloc/arena.c
index 74616df..d115d35 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -236,9 +236,11 @@ DL_TUNABLE_CALLBACK_FNDECL (set_perturb_byte, int32_t)
DL_TUNABLE_CALLBACK_FNDECL (set_trim_threshold, size_t)
DL_TUNABLE_CALLBACK_FNDECL (set_arena_max, size_t)
DL_TUNABLE_CALLBACK_FNDECL (set_arena_test, size_t)
+#if USE_TCACHE
DL_TUNABLE_CALLBACK_FNDECL (set_tcache_max, size_t)
DL_TUNABLE_CALLBACK_FNDECL (set_tcache_count, size_t)
DL_TUNABLE_CALLBACK_FNDECL (set_tcache_unsorted_limit, size_t)
+#endif
#else
/* Initialization routine. */
#include <string.h>
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 5b61f75..d19fa03 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -5083,7 +5083,7 @@ do_set_arena_max (size_t value)
return 1;
}
-#ifdef USE_TCACHE
+#if USE_TCACHE
static inline int
__always_inline
do_set_tcache_max (size_t value)
-----------------------------------------------------------------------
Summary of changes:
malloc/arena.c | 2 ++
malloc/malloc.c | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
hooks/post-receive
--
GNU C Library master sources