This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] malloc: fix hard-coded constant
- From: Joern Engel <joern at purestorage dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, Joern Engel <joern at purestorage dot com>
- Date: Mon, 25 Jan 2016 16:25:20 -0800
- Subject: [PATCH] malloc: fix hard-coded constant
- Authentication-results: sourceware.org; auth=none
- References: <1453767942-19369-1-git-send-email-joern at purestorage dot com>
8 used to be identical to NO_PREFETCH.
JIRA: PURE-27597
---
tpc/malloc2.13/tcache.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tpc/malloc2.13/tcache.h b/tpc/malloc2.13/tcache.h
index b269498657f3..b02203398f2f 100644
--- a/tpc/malloc2.13/tcache.h
+++ b/tpc/malloc2.13/tcache.h
@@ -290,7 +290,7 @@ static void *tcache_malloc(size_t size)
* those objects via tcache_gc. Also do it before taking the
* lock, to minimize hold times.
*/
- if (nb <= MAX_PREFETCH_SIZE && (cache->tc_size + nb * 8) > CACHE_SIZE )
+ if (nb <= MAX_PREFETCH_SIZE && (cache->tc_size + nb * NO_PREFETCH) > CACHE_SIZE)
tcache_gc(cache);
arena = arena_get(size);
--
2.7.0.rc3