[PATCH] malloc: fix hard-coded constant
Joern Engel
joern@purestorage.com
Tue Jan 26 00:27:00 GMT 2016
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
More information about the Libc-alpha
mailing list