aboutsummaryrefslogtreecommitdiffstats
path: root/src/jemalloc.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-02-03 15:30:42 -0800
committerJason Evans <jasone@canonware.com>2017-02-03 19:13:05 -0800
commit767ffa2b5f79d0f8458aceab3e628e27fe7a88dc (patch)
treefe11d96e5f6fcc22b7db4ea2158bc8ae28f81a5e /src/jemalloc.c
parentd27f29b468ae3e9d2b1da4a9880351d76e5a1662 (diff)
downloadplatform_external_jemalloc_new-767ffa2b5f79d0f8458aceab3e628e27fe7a88dc.tar.gz
platform_external_jemalloc_new-767ffa2b5f79d0f8458aceab3e628e27fe7a88dc.tar.bz2
platform_external_jemalloc_new-767ffa2b5f79d0f8458aceab3e628e27fe7a88dc.zip
Fix compute_size_with_overflow().
Fix compute_size_with_overflow() to use a high_bits mask that has the high bits set, rather than the low bits. This regression was introduced by 5154ff32ee8c37bacb6afd8a07b923eb33228357 (Unify the allocation paths).
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r--src/jemalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c
index 45e9aea7..af410958 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -1521,7 +1521,7 @@ compute_size_with_overflow(dynamic_opts_t *dopts, size_t *size) {
*/
/* A size_t with its high-half bits all set to 1. */
- const static size_t high_bits = SIZE_T_MAX >> (sizeof(size_t) * 8 / 2);
+ const static size_t high_bits = SIZE_T_MAX << (sizeof(size_t) * 8 / 2);
*size = dopts->item_size * dopts->num_items;