Lines Matching refs:Config

51 template <typename Config> static uptr addHeaderTag(uptr Ptr) {  in addHeaderTag()
52 if (allocatorSupportsMemoryTagging<Config>()) in addHeaderTag()
57 template <typename Config> static Header *getHeader(uptr Ptr) { in getHeader()
58 return reinterpret_cast<Header *>(addHeaderTag<Config>(Ptr)) - 1; in getHeader()
61 template <typename Config> static Header *getHeader(const void *Ptr) { in getHeader()
62 return getHeader<Config>(reinterpret_cast<uptr>(Ptr)); in getHeader()
89 template <typename Config> class MapAllocatorNoCache {
119 template <typename Config>
133 if (useMemoryTagging<Config>(Options) && isAligned(TaggedSize, PageSize)) { in mapSecondary()
141 (useMemoryTagging<Config>(Options) ? MAP_MEMTAG : 0) | Flags; in mapSecondary()
148 if (useMemoryTagging<Config>(Options) && CommitSize > MaxUnusedCacheBytes) { in mapSecondary()
156 (useMemoryTagging<Config>(Options) ? MAP_MEMTAG : 0) | Flags; in mapSecondary()
174 template <typename Config> class MapAllocatorCache {
202 static_assert(Config::getDefaultMaxEntriesCount() <=
203 Config::getEntriesArraySize(),
209 static_cast<sptr>(Config::getDefaultMaxEntriesCount())); in init()
211 static_cast<sptr>(Config::getDefaultMaxEntrySize())); in init()
213 if (Config::getDefaultReleaseToOsIntervalMs() != INT32_MIN) in init()
214 ReleaseToOsInterval = Config::getDefaultReleaseToOsIntervalMs(); in init()
233 if (useMemoryTagging<Config>(Options)) { in store()
240 mapSecondary<Config>(Options, Entry.CommitBase, Entry.CommitSize, in store()
252 if (useMemoryTagging<Config>(Options) && QuarantinePos == -1U) { in store()
259 if (Config::getQuarantineSize() && useMemoryTagging<Config>(Options)) { in store()
261 (QuarantinePos + 1) % Max(Config::getQuarantineSize(), 1u); in store()
359 LargeBlock::addHeaderTag<Config>(EntryHeaderPos)); in retrieve()
361 if (useMemoryTagging<Config>(Options)) in retrieve()
364 if (useMemoryTagging<Config>(Options)) { in retrieve()
366 storeTags(LargeBlock::addHeaderTag<Config>(Entry.CommitBase), in retrieve()
388 Min(static_cast<s32>(Value), Config::getMaxReleaseToOsIntervalMs()), in setOption()
389 Config::getMinReleaseToOsIntervalMs()); in setOption()
398 Min<u32>(static_cast<u32>(Value), Config::getEntriesArraySize())); in setOption()
413 for (u32 I = 0; I != Config::getQuarantineSize(); ++I) { in disableMemoryTagging()
438 MemMapT MapInfo[Config::getEntriesArraySize()]; in empty()
442 for (uptr I = 0; I < Config::getEntriesArraySize(); I++) { in empty()
475 for (uptr I = 0; I < Config::getQuarantineSize(); I++) in releaseOlderThan()
477 for (uptr I = 0; I < Config::getEntriesArraySize(); I++) in releaseOlderThan()
492 CachedBlock Entries[Config::getEntriesArraySize()] GUARDED_BY(Mutex) = {};
493 NonZeroLengthArray<CachedBlock, Config::getQuarantineSize()>
497 template <typename Config> class MapAllocator {
516 auto *B = LargeBlock::getHeader<Config>(Ptr); in getBlockEnd()
543 if (allocatorSupportsMemoryTagging<Config>()) in iterateOverBlocks()
562 typename Config::template CacheT<typename Config::CacheConfig> Cache;
586 template <typename Config>
587 void *MapAllocator<Config>::allocate(const Options &Options, uptr Size, in allocate()
608 if (allocatorSupportsMemoryTagging<Config>()) in allocate()
673 if (!mapSecondary<Config>(Options, CommitBase, CommitSize, AllocPos, 0, in allocate()
680 LargeBlock::addHeaderTag<Config>(HeaderPos)); in allocate()
681 if (useMemoryTagging<Config>(Options)) in allocate()
682 storeTags(LargeBlock::addHeaderTag<Config>(CommitBase), in allocate()
703 template <typename Config>
704 void MapAllocator<Config>::deallocate(const Options &Options, void *Ptr) in deallocate()
706 LargeBlock::Header *H = LargeBlock::getHeader<Config>(Ptr); in deallocate()
720 template <typename Config>
721 void MapAllocator<Config>::getStats(ScopedString *Str) EXCLUDES(Mutex) { in getStats()