Refactor jemalloc_ffs*() into ffs_*().
Use appropriate versions to resolve 64-to-32-bit data loss warnings.
This commit is contained in:
@@ -3391,8 +3391,7 @@ bin_info_run_size_calc(arena_bin_info_t *bin_info)
|
||||
* be twice as large in order to maintain alignment.
|
||||
*/
|
||||
if (config_fill && unlikely(opt_redzone)) {
|
||||
size_t align_min = ZU(1) << (jemalloc_ffs(bin_info->reg_size) -
|
||||
1);
|
||||
size_t align_min = ZU(1) << (ffs_zu(bin_info->reg_size) - 1);
|
||||
if (align_min <= REDZONE_MINSIZE) {
|
||||
bin_info->redzone_size = REDZONE_MINSIZE;
|
||||
pad_size = 0;
|
||||
|
@@ -716,7 +716,7 @@ chunk_boot(void)
|
||||
* so pages_map will always take fast path.
|
||||
*/
|
||||
if (!opt_lg_chunk) {
|
||||
opt_lg_chunk = jemalloc_ffs((int)info.dwAllocationGranularity)
|
||||
opt_lg_chunk = ffs_u((unsigned)info.dwAllocationGranularity)
|
||||
- 1;
|
||||
}
|
||||
#else
|
||||
|
Reference in New Issue
Block a user