Home
last modified time | relevance | path

Searched refs:SizeClassMap (Results 1 – 17 of 17) sorted by relevance

/external/scudo/standalone/tests/
Dprimary_test.cpp38 const scudo::uptr ClassId = Primary::SizeClassMap::getClassIdBySize(Size); in testPrimary()
56 using SizeClassMap = scudo::DefaultSizeClassMap; in TEST() typedef
58 testPrimary<scudo::SizeClassAllocator32<SizeClassMap, 18U>>(); in TEST()
60 testPrimary<scudo::SizeClassAllocator64<SizeClassMap, 24U>>(); in TEST()
61 testPrimary<scudo::SizeClassAllocator64<SizeClassMap, 24U, true>>(); in TEST()
77 const scudo::uptr ClassId = Primary::SizeClassMap::LargestClassId; in TEST()
113 const scudo::uptr Size = std::rand() % Primary::SizeClassMap::MaxSize; in testIteratePrimary()
114 const scudo::uptr ClassId = Primary::SizeClassMap::getClassIdBySize(Size); in testIteratePrimary()
142 using SizeClassMap = scudo::DefaultSizeClassMap; in TEST() typedef
144 testIteratePrimary<scudo::SizeClassAllocator32<SizeClassMap, 18U>>(); in TEST()
[all …]
Drelease_test.cpp129 template <class SizeClassMap> struct FreeBatch {
130 static const scudo::u32 MaxCount = SizeClassMap::MaxNumCachedHint;
148 template <class SizeClassMap> void testReleaseFreeMemoryToOS() { in testReleaseFreeMemoryToOS()
149 typedef FreeBatch<SizeClassMap> Batch; in testReleaseFreeMemoryToOS()
155 for (scudo::uptr I = 1; I <= SizeClassMap::LargestClassId; I++) { in testReleaseFreeMemoryToOS()
156 const scudo::uptr BlockSize = SizeClassMap::getSizeByClassId(I); in testReleaseFreeMemoryToOS()
Dsize_class_map_test.cpp13 template <class SizeClassMap> void testSizeClassMap() { in testSizeClassMap()
14 typedef SizeClassMap SCMap; in testSizeClassMap()
Dcombined_test.cpp139 constexpr scudo::uptr MaxSize = Config::Primary::SizeClassMap::MaxSize; in testAllocator()
/external/scudo/standalone/
Dallocator_config.h27 using SizeClassMap = DefaultSizeClassMap; member
30 typedef SizeClassAllocator64<SizeClassMap, 30U> Primary;
33 typedef SizeClassAllocator32<SizeClassMap, 19U> Primary;
40 using SizeClassMap = AndroidSizeClassMap; member
43 typedef SizeClassAllocator64<SizeClassMap, 28U, 1000, 1000,
48 typedef SizeClassAllocator32<SizeClassMap, 18U, 1000, 1000> Primary;
58 using SizeClassMap = SvelteSizeClassMap; member
61 typedef SizeClassAllocator64<SizeClassMap, 27U, 1000, 1000> Primary;
64 typedef SizeClassAllocator32<SizeClassMap, 16U, 1000, 1000> Primary;
Dlocal_cache.h19 typedef typename SizeClassAllocator::SizeClassMap SizeClassMap; typedef
22 static const u32 MaxNumCached = SizeClassMap::MaxNumCachedHint;
42 return Min(MaxNumCached, SizeClassMap::getMaxCachedHint(Size)); in getMaxCached()
114 if (ClassId != SizeClassMap::BatchClassId) in createBatch()
115 B = allocate(SizeClassMap::BatchClassId); in createBatch()
122 static const uptr NumClasses = SizeClassMap::NumClasses;
150 if (ClassId != SizeClassMap::BatchClassId) in destroyBatch()
151 deallocate(SizeClassMap::BatchClassId, B); in destroyBatch()
172 SizeClassAllocator::getSizeByClassId(SizeClassMap::BatchClassId)); in drain()
Dprimary64.h48 typedef SizeClassMapT SizeClassMap; typedef
50 SizeClassMap, RegionSizeLog, MinReleaseToOsIntervalMs,
59 return (ClassId == SizeClassMap::BatchClassId) in getSizeByClassId()
61 : SizeClassMap::getSizeByClassId(ClassId); in getSizeByClassId()
64 static bool canAllocate(uptr Size) { return Size <= SizeClassMap::MaxSize; } in canAllocate()
89 Region->CanRelease = (I != SizeClassMap::BatchClassId) && in initLinkerInitialized()
138 if (static_cast<uptr>(I) == SizeClassMap::BatchClassId) in disable()
142 getRegionInfo(SizeClassMap::BatchClassId)->Mutex.lock(); in disable()
146 getRegionInfo(SizeClassMap::BatchClassId)->Mutex.unlock(); in enable()
148 if (I == SizeClassMap::BatchClassId) in enable()
[all …]
Dprimary32.h46 typedef SizeClassMapT SizeClassMap; typedef
48 static_assert(SizeClassMap::LargestClassId <= (UINT8_MAX - 1), "");
50 static_assert((1UL << RegionSizeLog) >= SizeClassMap::MaxSize, "");
60 return (ClassId == SizeClassMap::BatchClassId) in getSizeByClassId()
62 : SizeClassMap::getSizeByClassId(ClassId); in getSizeByClassId()
65 static bool canAllocate(uptr Size) { return Size <= SizeClassMap::MaxSize; } in canAllocate()
84 Sci->CanRelease = (I != SizeClassMap::BatchClassId) && in initLinkerInitialized()
137 if (static_cast<uptr>(I) == SizeClassMap::BatchClassId) in disable()
141 getSizeClassInfo(SizeClassMap::BatchClassId)->Mutex.lock(); in disable()
149 getSizeClassInfo(SizeClassMap::BatchClassId)->Mutex.unlock(); in enable()
[all …]
Dcombined.h76 const uptr QuarantineClassId = SizeClassMap::getClassIdBySize( in allocate()
81 reportOutOfMemory(SizeClassMap::getSizeByClassId(QuarantineClassId)); in allocate()
95 const uptr QuarantineClassId = SizeClassMap::getClassIdBySize( in deallocate()
265 ClassId = SizeClassMap::getClassIdBySize(NeededSize);
275 while (ClassId < SizeClassMap::LargestClassId) {
499 SizeClassMap::getSizeByClassId(ClassId);
695 typedef typename PrimaryT::SizeClassMap SizeClassMap; typedef
744 SizeClassMap::MaxSize - MinAlignment); in performSanityChecks()
756 const uptr MaxSizeOrUnusedBytes = SizeClassMap::MaxSize - 1; in performSanityChecks()
761 const uptr LargestClassId = SizeClassMap::LargestClassId; in performSanityChecks()
Dwrappers_c.inc214 decltype(SCUDO_ALLOCATOR)::PrimaryT::SizeClassMap::MaxSize;
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_allocator.h91 class SizeClassMap {
195 typedef SizeClassMap<17, 128, 16> DefaultSizeClassMap;
196 typedef SizeClassMap<17, 64, 14> CompactSizeClassMap;
316 const uptr kMetadataSize, class SizeClassMap,
320 typedef typename SizeClassMap::TransferBatch Batch;
322 SizeClassMap, MapUnmapCallback> ThisT;
349 return size <= SizeClassMap::kMaxSize && in CanAllocate()
350 alignment <= SizeClassMap::kMaxSize; in CanAllocate()
387 uptr size = SizeClassMap::Size(class_id); in GetBlockBegin()
402 return SizeClassMap::Size(GetSizeClass(p)); in GetActuallyAllocatedSize()
[all …]
/external/compiler-rt/lib/asan/
Dasan_allocator.h129 typedef DefaultSizeClassMap SizeClassMap; typedef
131 SizeClassMap, AsanMapUnmapCallback> PrimaryAllocator;
140 typedef CompactSizeClassMap SizeClassMap; typedef
142 SizeClassMap, kRegionSizeLog,
147 static const uptr kNumberOfSizeClasses = SizeClassMap::kNumClasses;
Dasan_allocator.cc112 if (user_requested_size != SizeClassMap::kMaxSize) in UsedSize()
416 m->user_requested_size = SizeClassMap::kMaxSize; in Allocate()
440 if (needed_size > SizeClassMap::kMaxSize) in Allocate()
443 thread_stats.malloced_by_size[SizeClassMap::ClassID(needed_size)]++; in Allocate()
/external/compiler-rt/lib/msan/
Dmsan_allocator.cc47 typedef CompactSizeClassMap SizeClassMap; typedef
50 SizeClassMap, kRegionSizeLog, ByteMap,
81 typedef CompactSizeClassMap SizeClassMap; typedef
84 SizeClassMap, kRegionSizeLog, ByteMap,
/external/compiler-rt/lib/lsan/
Dlsan_allocator.cc40 typedef CompactSizeClassMap SizeClassMap; typedef
42 sizeof(ChunkMetadata), SizeClassMap, kRegionSizeLog, ByteMap>
/external/compiler-rt/lib/scudo/
Dscudo_allocator.cpp37 typedef DefaultSizeClassMap SizeClassMap; typedef
38 typedef SizeClassAllocator64<AllocatorSpace, AllocatorSize, 0, SizeClassMap>
/external/compiler-rt/lib/sanitizer_common/tests/
Dsanitizer_allocator_test.cc70 template <class SizeClassMap>
72 typedef SizeClassMap SCMap; in TestSizeClassMap()
784 typedef SizeClassMap<63, 128, 16> SpecialSizeClassMap; in TEST()