reduce skipdet_e memory usage

By using bitmaps, the memory requirement for
`q->skipdet_e->skip_eff_map` and `done_inf_map`, which previously scaled
with the corpus size, is reduced to one-eighth of its original size.
This commit is contained in:
Kuang-che Wu
2025-04-05 01:49:27 +00:00
parent 56b5983b61
commit ec07f531f8
4 changed files with 38 additions and 38 deletions

View File

@ -1452,6 +1452,18 @@ static inline int permissive_create(afl_state_t *afl, const char *fn) {
}
static inline void bitmap_set(u8 *map, u32 index) {
map[index / 8] |= (1u << (index % 8));
}
static inline u8 bitmap_read(u8 *map, u32 index) {
return (map[index / 8] >> (index % 8)) & 1;
}
#if TESTCASE_CACHE == 1
#error define of TESTCASE_CACHE must be zero or larger than 1
#endif