class RegionPageMap

Defined at line 218 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 220 of file ../../third_party/scudo/src/release.h

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

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

void ~RegionPageMap ()

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

void reset (uptr NumberOfRegions, 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 237 of file ../../third_party/scudo/src/release.h

bool isAllocated ()

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

uptr getCount ()

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

uptr get (uptr Region, uptr I)

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

void inc (uptr Region, uptr I)

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

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

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

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

Defined at line 303 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 314 of file ../../third_party/scudo/src/release.h

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

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

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

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

bool isAllCounted (uptr Region, uptr I)

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

uptr getBufferNumElements ()

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