mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-07 14:23:04 +03:00
Initialize arena_bin_info at compile time rather than at boot time.
This resolves #370.
This commit is contained in:
parent
b683734b43
commit
627372b459
5 changed files with 100 additions and 96 deletions
|
|
@ -81,7 +81,7 @@ static uint8_t malloc_slow_flags;
|
|||
/* Last entry for overflow detection only. */
|
||||
JEMALLOC_ALIGNED(CACHELINE)
|
||||
const size_t index2size_tab[NSIZES+1] = {
|
||||
#define SC(index, lg_grp, lg_delta, ndelta, bin, lg_delta_lookup) \
|
||||
#define SC(index, lg_grp, lg_delta, ndelta, bin, pgs, lg_delta_lookup) \
|
||||
((ZU(1)<<lg_grp) + (ZU(ndelta)<<lg_delta)),
|
||||
SIZE_CLASSES
|
||||
#undef SC
|
||||
|
|
@ -154,7 +154,7 @@ const uint8_t size2index_tab[] = {
|
|||
#define S2B_11(i) S2B_10(i) S2B_10(i)
|
||||
#endif
|
||||
#define S2B_no(i)
|
||||
#define SC(index, lg_grp, lg_delta, ndelta, bin, lg_delta_lookup) \
|
||||
#define SC(index, lg_grp, lg_delta, ndelta, bin, pgs, lg_delta_lookup) \
|
||||
S2B_##lg_delta_lookup(index)
|
||||
SIZE_CLASSES
|
||||
#undef S2B_3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue