Namespaces
Enumerations
enum memory_order
| Name | Value |
|---|---|
| memory_order_relaxed | 0 |
| memory_order_consume | 1 |
| memory_order_acquire | 2 |
| memory_order_release | 3 |
| memory_order_acq_rel | 4 |
| memory_order_seq_cst | 5 |
Defined at line 16 of file ../../third_party/scudo/src/atomic_helpers.h
enum OptionBit
| Name | Value |
|---|---|
| MayReturnNull | 0 |
| FillContents0of2 | 1 |
| FillContents1of2 | 2 |
| DeallocTypeMismatch | 3 |
| DeleteSizeMismatch | 4 |
| TrackAllocationStacks | 5 |
| UseOddEvenTags | 6 |
| UseMemoryTagging | 7 |
| AddLargeAllocationSlack | 8 |
Defined at line 18 of file ../../third_party/scudo/src/options.h
enum FlagType
| Name | Value |
|---|---|
| FT_bool | 0 |
| FT_int | 1 |
Defined at line 19 of file ../../third_party/scudo/src/flags_parser.h
enum StatType
| Name | Value |
|---|---|
| StatAllocated | 0 |
| StatFree | 1 |
| StatMapped | 2 |
| StatCount | 3 |
Memory allocator statistics
Defined at line 22 of file ../../third_party/scudo/src/stats.h
enum AllocatorAction
| Name | Value |
|---|---|
| Recycling | 0 |
| Deallocating | 1 |
| Reallocating | 2 |
| Sizing | 3 |
Defined at line 38 of file ../../third_party/scudo/src/report.h
enum Checksum
| Name | Value |
|---|---|
| BSD | 0 |
| HardwareCRC32 | 1 |
Defined at line 40 of file ../../third_party/scudo/src/checksum.h
enum Option
| Name | Value |
|---|---|
| ReleaseInterval | 0 |
| MemtagTuning | 1 |
| ThreadDisableMemInit | 2 |
| MaxCacheEntriesCount | 3 |
| MaxCacheEntrySize | 4 |
| MaxTSDsCount | 5 |
Defined at line 239 of file ../../third_party/scudo/src/common.h
enum ReleaseToOS
| Name | Value |
|---|---|
| Normal | 0 |
| Force | 1 |
| ForceAll | 2 |
Defined at line 249 of file ../../third_party/scudo/src/common.h
enum FillContentsMode
| Name | Value |
|---|---|
| NoFill | 0 |
| ZeroFill | 1 |
| PatternOrZeroFill | 2 |
Defined at line 258 of file ../../third_party/scudo/src/common.h
Records
-
class Allocator -
class AndroidConfig -
class AndroidSizeClassConfig -
class AtomicOptions -
class BaseConfig -
class Batch -
class BatchGroup -
class BlockInfo -
class BufferPool -
class ConditionVariableBase -
class ConditionVariableDummy -
class Conditional -
class Conditional -
class DefaultConfig -
class DefaultSizeClassConfig -
class DoublyLinkedList -
class FixedSizeClassMap -
class FlagParser -
class Flags -
class FlatByteMap -
class FragmentationRecorder -
class FreePagesRangeTracker -
class FuchsiaConfig -
class FuchsiaSizeClassConfig -
class GlobalQuarantine -
class GlobalStats -
class HybridMutex -
class IntrusiveList -
class IteratorBase -
class LinkOp -
class LinkOp -
class LocalStats -
class MapAllocator -
class MapAllocatorCache -
class MapAllocatorNoCache -
class MapPlatformData -
class MemMapBase -
class MemMapDefault -
class MemMapFuchsia -
class MemoryGroupFragmentationRecorder -
class MurMur2HashBuilder -
class NonZeroLengthArray -
class NonZeroLengthArray -
class Options -
class PageReleaseContext -
class PrimaryConfig -
class QuarantineBatch -
class QuarantineCache -
class RegionPageMap -
class RegionReleaseRecorder -
class ReleaseRecorder -
class ReservedMemory -
class ReservedMemoryDefault -
class ReservedMemoryFuchsia -
class ScopedDisableMemoryTagChecks -
class ScopedLock -
class ScopedString -
class SecondaryConfig -
class SinglyLinkedList -
class SizeClassAllocator32 -
class SizeClassAllocator64 -
class SizeClassAllocatorLocalCache -
class SizeClassAllocatorNoCache -
class SizeClassMapBase -
class StackDepot -
class TSD -
class TSDRegistryExT -
class TSDRegistrySharedT -
class TableSizeClassMap -
class ThreadState -
class TrustyConfig -
class TrustySizeClassConfig -
class Vector -
class VectorNoCtor -
class assertSameType -
class atomic_s32 -
class atomic_u16 -
class atomic_u32 -
class atomic_u64 -
class atomic_u8 -
class atomic_uptr -
class isPointer -
class isPointer -
class removeConst -
class removeConst -
class voidAdaptor
Functions
-
u16 computeChecksum (u32 Seed, uptr Value, uptr * Array, uptr ArraySize)Defined at line 23 of file ../../third_party/scudo/src/chunk.h
-
template <class Dest, class Source>Dest bit_cast (const Source & S)Defined at line 24 of file ../../third_party/scudo/src/common.h
-
bool isPowerOfTwo (uptr X)Defined at line 31 of file ../../third_party/scudo/src/common.h
-
bool archSupportsMemoryTagging ()Defined at line 43 of file ../../third_party/scudo/src/memtag.h
-
uptr archMemoryTagGranuleSize ()Defined at line 45 of file ../../third_party/scudo/src/memtag.h
-
u16 computeBSDChecksum (u16 Sum, uptr Data)BSD checksum, unlike a software CRC32, doesn't use any array lookup. We save
significantly on memory accesses, as well as 1K of CRC32 table, on platforms
that do no support hardware CRC32. The checksum itself is 16-bit, which is at
odds with CRC32, but enough for our needs.
Defined at line 49 of file ../../third_party/scudo/src/checksum.h
-
bool isAligned (uptr X, uptr Alignment)Defined at line 53 of file ../../third_party/scudo/src/common.h
-
uint8_t extractTag (uptr Ptr)Defined at line 54 of file ../../third_party/scudo/src/memtag.h
-
bool isAlignedSlow (uptr X, uptr Alignment)Defined at line 57 of file ../../third_party/scudo/src/common.h
-
template <class T>T Min (T A, T B)Defined at line 61 of file ../../third_party/scudo/src/common.h
-
template <class T>T Max (T A, T B)Defined at line 63 of file ../../third_party/scudo/src/common.h
-
template <typename T>typename T::Type atomic_load (const volatile T * A, memory_order MO)Defined at line 63 of file ../../third_party/scudo/src/atomic_helpers.h
-
template <class T>void Swap (T & A, T & B)Defined at line 65 of file ../../third_party/scudo/src/common.h
-
template <typename T>void atomic_store (volatile T * A, typename T::Type V, memory_order MO)Defined at line 71 of file ../../third_party/scudo/src/atomic_helpers.h
-
uptr getMostSignificantSetBitIndex (uptr X)Defined at line 71 of file ../../third_party/scudo/src/common.h
-
void atomic_thread_fence (memory_order )Defined at line 76 of file ../../third_party/scudo/src/atomic_helpers.h
-
template <typename T>typename T::Type atomic_fetch_add (volatile T * A, typename T::Type V, memory_order MO)Defined at line 79 of file ../../third_party/scudo/src/atomic_helpers.h
-
uptr getLeastSignificantSetBitIndex (uptr X)Defined at line 86 of file ../../third_party/scudo/src/common.h
-
template <typename T>typename T::Type atomic_fetch_sub (volatile T * A, typename T::Type V, memory_order MO)Defined at line 86 of file ../../third_party/scudo/src/atomic_helpers.h
-
uptr getLog2 (uptr X)Defined at line 91 of file ../../third_party/scudo/src/common.h
-
template <typename T>typename T::Type atomic_fetch_and (volatile T * A, typename T::Type V, memory_order MO)Defined at line 93 of file ../../third_party/scudo/src/atomic_helpers.h
-
u32 getRandomU32 (u32 * State)Defined at line 96 of file ../../third_party/scudo/src/common.h
-
template <typename T>typename T::Type atomic_fetch_or (volatile T * A, typename T::Type V, memory_order MO)Defined at line 100 of file ../../third_party/scudo/src/atomic_helpers.h
-
u32 getRandomModN (u32 * State, u32 N)Defined at line 106 of file ../../third_party/scudo/src/common.h
-
template <typename T>typename T::Type atomic_exchange (volatile T * A, typename T::Type V, memory_order MO)Defined at line 107 of file ../../third_party/scudo/src/atomic_helpers.h
-
template <typename T>bool atomic_compare_exchange_strong (volatile T * A, typename T::Type * Cmp, typename T::Type Xchg, memory_order MO)Defined at line 116 of file ../../third_party/scudo/src/atomic_helpers.h
-
void computePercentage (uptr Numerator, uptr Denominator, uptr * Integral, uptr * Fractional)Defined at line 119 of file ../../third_party/scudo/src/common.h
-
template <typename T>typename T::Type atomic_load_relaxed (const volatile T * A)Clutter-reducing helpers.
Defined at line 126 of file ../../third_party/scudo/src/atomic_helpers.h
-
template <typename T>void atomic_store_relaxed (volatile T * A, typename T::Type V)Defined at line 131 of file ../../third_party/scudo/src/atomic_helpers.h
-
template <typename T>typename T::Type atomic_compare_exchange_strong (volatile T * A, typename T::Type Cmp, typename T::Type Xchg, memory_order MO)Defined at line 136 of file ../../third_party/scudo/src/atomic_helpers.h
-
template <typename Config>bool mapSecondary (const Options & Options, uptr CommitBase, uptr CommitSize, uptr AllocPos, uptr Flags, MemMapT & MemMap)Defined at line 153 of file ../../third_party/scudo/src/secondary.h
-
uptr getPageSizeCached ()Defined at line 157 of file ../../third_party/scudo/src/common.h
-
uptr getPageSizeLogCached ()Defined at line 163 of file ../../third_party/scudo/src/common.h
-
void enableSystemMemoryTaggingTestOnly ()Defined at line 270 of file ../../third_party/scudo/src/memtag.h
-
uptr addFixedTag (uptr Ptr, uptr Tag)Defined at line 284 of file ../../third_party/scudo/src/memtag.h
-
uptr loadTag (uptr Ptr)Defined at line 301 of file ../../third_party/scudo/src/memtag.h
-
void * loadTag (void * Ptr)Defined at line 321 of file ../../third_party/scudo/src/memtag.h
-
void * addFixedTag (void * Ptr, uptr Tag)Defined at line 325 of file ../../third_party/scudo/src/memtag.h
-
template <typename Config>bool allocatorSupportsMemoryTagging ()Defined at line 331 of file ../../third_party/scudo/src/memtag.h
-
void reportError (const char * Message)Generic error, adds newline to end of message.
-
void reportRawError (const char * Message)Generic error, but the message is not modified.
-
void reportInvalidFlag (const char * FlagType, const char * Value)Flags related errors.
-
void reportHeaderCorruption (void * Header, const void * Ptr)Chunk header related errors.
-
template <class Allocator>void teardownThread (void * Ptr)Defined at line 180 of file ../../third_party/scudo/src/tsd_exclusive.h
-
void reportSanityCheckError (const char * Field)Sanity checks related error.
-
Flags * getFlags () -
void initFlags () -
void reportAlignmentTooBig (uptr Alignment, uptr MaxAlignment)Combined allocator errors.
-
void registerFlags (FlagParser * Parser, Flags * F) -
void reportAllocationSizeTooBig (uptr UserSize, uptr TotalSize, uptr MaxSize) -
void reportOutOfBatchClass () -
void reportOutOfMemory (uptr RequestedSize) -
void reportInvalidChunkState (AllocatorAction Action, const void * Ptr) -
void reportMisalignedPointer (AllocatorAction Action, const void * Ptr) -
void Printf (const char * Format) -
void reportDeallocTypeMismatch (AllocatorAction Action, const void * Ptr, u8 TypeA, u8 TypeB) -
void reportDeleteSizeMismatch (const void * Ptr, uptr Size, uptr ExpectedSize) -
void reportUnrecognizedFlags () -
void reportAlignmentNotPowerOfTwo (uptr Alignment)C wrappers errors.
-
void reportInvalidPosixMemalignAlignment (uptr Alignment) -
void reportCallocOverflow (uptr Count, uptr Size) -
void reportPvallocOverflow (uptr Size) -
void reportInvalidAlignedAllocAlignment (uptr Size, uptr Alignment) -
bool hasHardwareCRC32 () -
u32 computeHardwareCRC32 (u32 Crc, uptr Data) -
void outputRaw (const char * Buffer)The following two functions have platform specific implementations.
-
void die () -
void reportCheckFailed (const char * File, int Line, const char * Condition, u64 Value1, u64 Value2) -
uptr getPageSize ()Must be defined in platform specific code.
-
uptr getPageSizeSlow ()Always calls getPageSize(), but caches the results for get*Cached(), below.
-
u32 getNumberOfCPUs ()Returns 0 if the number of CPUs could not be determined.
-
const char * getEnv (const char * Name) -
u64 getMonotonicTime () -
u64 getMonotonicTimeFast ()Gets the time faster but with less accuracy. Can call getMonotonicTime
if no fast version is available.
-
u32 getThreadID () -
bool getRandom (void * Buffer, uptr Length, bool Blocking) -
u64 getResidentPages (uptr BaseAddress, uptr Size)Get the total number of resident pages for BaseAddress to BaseAddress + Size.
This function can run slowly, and is only expected to be called
from getStats functions where performance does not matter.
-
void * map (void * Addr, uptr Size, const char * Name, uptr Flags, MapPlatformData * Data)Our platform memory mapping use is restricted to 3 scenarios:
- reserve memory at a random address (MAP_NOACCESS);
- commit memory in a previously reserved space;
- commit memory at a random address.
As such, only a subset of parameters combinations is valid, which is checked
by the function implementation. The Data parameter allows to pass opaque
platform specific data to the function.
Returns nullptr on error or dies if MAP_ALLOWNOMEM is not specified.
-
void releasePagesToOS (uptr BaseAddress, uptr Offset, uptr Size, MapPlatformData * Data) -
uptr scaledLog2 (uptr Size, uptr ZeroLog, uptr LogBits)Defined at line 18 of file ../../third_party/scudo/src/size_class_map.h
-
uptr roundUp (uptr X, uptr Boundary)Defined at line 37 of file ../../third_party/scudo/src/common.h
-
uptr roundUpSlow (uptr X, uptr Boundary)Defined at line 41 of file ../../third_party/scudo/src/common.h
-
uptr roundDown (uptr X, uptr Boundary)Defined at line 45 of file ../../third_party/scudo/src/common.h
-
uptr roundDownSlow (uptr X, uptr Boundary)Defined at line 49 of file ../../third_party/scudo/src/common.h
-
uptr roundUpPowerOfTwo (uptr Size)Defined at line 76 of file ../../third_party/scudo/src/common.h
-
uptr selectRandomTag (uptr Ptr, uptr ExcludeMask)Defined at line 278 of file ../../third_party/scudo/src/memtag.h
-
template <typename SCMap>void printMap ()Defined at line 304 of file ../../third_party/scudo/src/size_class_map.h
-
template <class ReleaseRecorderT, typename SkipRegionT>void releaseFreeMemoryToOS (PageReleaseContext & Context, ReleaseRecorderT & Recorder, SkipRegionT SkipRegion)Try to release the page which doesn't have any in-used block, i.e., they are
all free blocks. The `PageMap` will record the number of free blocks in each
page.
Defined at line 640 of file ../../third_party/scudo/src/release.h
-
void teardownThread (void * Ptr) -
void unmap (void * Addr, uptr Size, uptr Flags, MapPlatformData * Data) -
void setMemoryPermission (uptr Addr, uptr Size, uptr Flags, MapPlatformData * Data) -
void setAbortMessage (const char * Message)Logging related functions.
-
template <typename Config>bool useMemoryTagging (const Options & Options)Defined at line 41 of file ../../third_party/scudo/src/options.h
-
uptr untagPointer (uptr Ptr)Defined at line 49 of file ../../third_party/scudo/src/memtag.h
-
template <typename T>void shuffle (T * A, u32 N, u32 * RandState)Defined at line 110 of file ../../third_party/scudo/src/common.h
-
bool systemSupportsMemoryTagging ()Defined at line 264 of file ../../third_party/scudo/src/memtag.h
-
bool systemDetectsMemoryTagFaultsTestOnly ()Defined at line 266 of file ../../third_party/scudo/src/memtag.h
-
uptr storeTags (uptr Begin, uptr End)Defined at line 290 of file ../../third_party/scudo/src/memtag.h
-
void storeTag (uptr Ptr)Defined at line 296 of file ../../third_party/scudo/src/memtag.h
-
void setRandomTag (void * Ptr, uptr Size, uptr ExcludeMask, uptr * TaggedBegin, uptr * TaggedEnd)Defined at line 310 of file ../../third_party/scudo/src/memtag.h
-
void * untagPointer (void * Ptr)Defined at line 317 of file ../../third_party/scudo/src/memtag.h
Variables
Checksum HashAlgorithm
uptr PageSizeCached
uptr PageSizeLogCached