llvm /
scudo /
f37695b214e2096464fdf5228d77a70989043722 [scudo][standalone] Use BatchClassId in drain rather than 0
D99763 fixed `SizeClassAllocatorLocalCache::drain` but with the
assumption that `BatchClassId` is 0 - which is currently true. I would
rather not make the assumption so that if we ever change the ID of
the batch class, the loop would still work. Since `BatchClassId` is
used more often in `local_cache.h`, introduce a constant so that we
don't have to specify `SizeClassMap::` every time.
Differential Revision: https://reviews.llvm.org/D100062
GitOrigin-RevId: 50979defc9555d66dc2427e1dac68fd62c45e524
1 file changed