mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 16:43:33 +03:00
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 5154ff32ee (Unify the allocation
paths).
This commit is contained in:
parent
d27f29b468
commit
767ffa2b5f
1 changed files with 1 additions and 1 deletions
|
|
@ -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. */
|
/* 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;
|
*size = dopts->item_size * dopts->num_items;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue