mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-02 08:30:27 +03:00
Fix size class calculation for sec
Due to a bug in sec initialization, the number of cached size classes was equal to 198. The bug caused the creation of more than a hundred of unused bins, although it didn't affect the caching logic.
This commit is contained in:
parent
7ae0f15c59
commit
52631c90f6
2 changed files with 9 additions and 5 deletions
|
|
@ -46,6 +46,7 @@ test_sec_init(sec_t *sec, pai_t *fallback, size_t nshards, size_t max_alloc,
|
|||
|
||||
bool err = sec_init(TSDN_NULL, sec, base, fallback, &opts);
|
||||
assert_false(err, "Unexpected initialization failure");
|
||||
assert_u_ge(sec->npsizes, 0, "Zero size classes allowed for caching");
|
||||
}
|
||||
|
||||
static inline edata_t *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue