File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ class SizeClassAllocator32 {
198198 return GetSizeClass (p) != 0 ;
199199 }
200200
201- uptr GetSizeClass (const void *p) {
201+ uptr GetSizeClass (const void *p) const {
202202 return possible_regions[ComputeRegionId (reinterpret_cast <uptr>(p))];
203203 }
204204
@@ -251,7 +251,7 @@ class SizeClassAllocator32 {
251251
252252 // Iterate over all existing chunks.
253253 // The allocator must be locked when calling this function.
254- void ForEachChunk (ForEachChunkCallback callback, void *arg) {
254+ void ForEachChunk (ForEachChunkCallback callback, void *arg) const {
255255 for (uptr region = 0 ; region < kNumPossibleRegions ; region++)
256256 if (possible_regions[region]) {
257257 uptr chunk_size = ClassIdToSize (possible_regions[region]);
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class FlatMap {
4141 CHECK_EQ (0U , map_[idx]);
4242 map_[idx] = val;
4343 }
44- u8 operator [](uptr idx) {
44+ u8 operator [](uptr idx) const {
4545 CHECK_LT (idx, kSize );
4646 // FIXME: CHECK may be too expensive here.
4747 return map_[idx];
You can’t perform that action at this time.
0 commit comments