class RegionPageMap

Defined at line 212 of file ../../third_party/scudo/src/release.h

A Region page map is used to record the usage of pages in the regions. It

implements a packed array of Counters. Each counter occupies 2^N bits, enough

to store counter's MaxValue. Ctor will try to use a static buffer first, and

if that fails (the buffer is too small or already locked), will allocate the

required Buffer via map(). The caller is expected to check whether the

initialization was successful by checking isAllocated() result. For

performance sake, none of the accessors check the validity of the arguments,

It is assumed that Index is always in [0, N) range and the value is not

incremented past MaxValue.

Public Methods

void RegionPageMap ()

Defined at line 214 of file ../../third_party/scudo/src/release.h

void RegionPageMap (uptr NumberOfRegions, uptr CountersPerRegion, uptr MaxValue)

Defined at line 218 of file ../../third_party/scudo/src/release.h

void ~RegionPageMap ()

Defined at line 221 of file ../../third_party/scudo/src/release.h

void reset (uptr NumberOfRegion, uptr CountersPerRegion, uptr MaxValue)

Lock of `StaticBuffer` is acquired conditionally and there's no easy way to

specify the thread-safety attribute properly in current code structure.

Besides, it's the only place we may want to check thread safety. Therefore,

it's fine to bypass the thread-safety analysis now.

Defined at line 232 of file ../../third_party/scudo/src/release.h

bool isAllocated ()

Defined at line 261 of file ../../third_party/scudo/src/release.h

uptr getCount ()

Defined at line 263 of file ../../third_party/scudo/src/release.h

uptr get (uptr Region, uptr I)

Defined at line 265 of file ../../third_party/scudo/src/release.h

void inc (uptr Region, uptr I)

Defined at line 274 of file ../../third_party/scudo/src/release.h

void incN (uptr Region, uptr I, uptr N)

Defined at line 284 of file ../../third_party/scudo/src/release.h

void incRange (uptr Region, uptr From, uptr To)

Defined at line 295 of file ../../third_party/scudo/src/release.h

void setAsAllCounted (uptr Region, uptr I)

Set the counter to the max value. Note that the max number of blocks in a

page may vary. To provide an easier way to tell if all the blocks are

counted for different pages, set to the same max value to denote the

all-counted status.

Defined at line 306 of file ../../third_party/scudo/src/release.h

void setAsAllCountedRange (uptr Region, uptr From, uptr To)

Defined at line 313 of file ../../third_party/scudo/src/release.h

bool updateAsAllCountedIf (uptr Region, uptr I, uptr MaxCount)

Defined at line 320 of file ../../third_party/scudo/src/release.h

bool isAllCounted (uptr Region, uptr I)

Defined at line 330 of file ../../third_party/scudo/src/release.h

uptr getBufferNumElements ()

Defined at line 334 of file ../../third_party/scudo/src/release.h