mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 09:07:18 +03:00
Refactor jemalloc_ffs*() into ffs_*().
Use appropriate versions to resolve 64-to-32-bit data loss warnings.
This commit is contained in:
parent
b41a07c31a
commit
9f4ee6034c
8 changed files with 72 additions and 42 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue