mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-17 16:11:42 +03:00
Fix bitmap_sfu() regression.
Fix bitmap_sfu() to shift by LG_BITMAP_GROUP_NBITS rather than
hard-coded 6 when using linear (non-USE_TREE) bitmap search. In
practice this affects only 64-bit systems for which sizeof(long) is not
8 (i.e. Windows), since USE_TREE is defined for 32-bit systems.
This regression was caused by b8823ab026
(Use linear scan for small bitmaps).
This resolves #368.
This commit is contained in:
parent
8d8960f635
commit
8c83c021b0
1 changed files with 1 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ bitmap_sfu(bitmap_t *bitmap, const bitmap_info_t *binfo)
|
|||
i++;
|
||||
g = bitmap[i];
|
||||
}
|
||||
bit = (bit - 1) + (i << 6);
|
||||
bit = (bit - 1) + (i << LG_BITMAP_GROUP_NBITS);
|
||||
#endif
|
||||
bitmap_set(bitmap, binfo, bit);
|
||||
return (bit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue