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:
committed by
Alexander Lapenkov
parent
7ae0f15c59
commit
52631c90f6
@@ -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 *
|
||||
|
Reference in New Issue
Block a user