Home
last modified time | relevance | path

Searched refs:Allocator (Results 1 – 25 of 1092) sorted by relevance

12345678910>>...44

/external/scudo/standalone/tests/
Dcombined_test.cpp46 void checkMemoryTaggingMaybe(AllocatorT *Allocator, void *P, scudo::uptr Size, in checkMemoryTaggingMaybe() argument
50 if (Allocator->useMemoryTaggingTestOnly()) in checkMemoryTaggingMaybe()
58 ? Allocator->useMemoryTaggingTestOnly() in checkMemoryTaggingMaybe()
69 template <typename Config> struct TestAllocator : scudo::Allocator<Config> {
91 Allocator = std::make_unique<AllocatorT>(); in ScudoCombinedTest()
94 Allocator->releaseToOS(); in ~ScudoCombinedTest()
103 std::unique_ptr<AllocatorT> Allocator; member
130 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
133 Allocator->isOwned(&StaticBuffer[scudo::Chunk::getHeaderSize()])); in SCUDO_TYPED_TEST()
138 EXPECT_FALSE(Allocator->isOwned(&StackBuffer[scudo::Chunk::getHeaderSize()])); in SCUDO_TYPED_TEST()
[all …]
Dtsd_test.cpp50 template <class Allocator>
51 using TSDRegistryT = scudo::TSDRegistrySharedT<Allocator, 1U, 1U>;
55 template <class Allocator>
56 using TSDRegistryT = scudo::TSDRegistrySharedT<Allocator, 16U, 8U>;
60 template <class Allocator>
61 using TSDRegistryT = scudo::TSDRegistryExT<Allocator>;
70 std::unique_ptr<AllocatorT, decltype(Deleter)> Allocator(new AllocatorT, in TEST() local
72 Allocator->reset(); in TEST()
73 EXPECT_FALSE(Allocator->isInitialized()); in TEST()
75 auto Registry = Allocator->getTSDRegistry(); in TEST()
[all …]
Dprimary_test.cpp104 std::unique_ptr<Primary> Allocator(new Primary); in SCUDO_TYPED_TEST() local
105 Allocator->init(/*ReleaseToOsInterval=*/-1); in SCUDO_TYPED_TEST()
107 Cache.init(nullptr, Allocator.get()); in SCUDO_TYPED_TEST()
124 Allocator->releaseToOS(); in SCUDO_TYPED_TEST()
126 Allocator->getStats(&Str); in SCUDO_TYPED_TEST()
145 Primary Allocator; in TEST() local
146 Allocator.init(/*ReleaseToOsInterval=*/-1); in TEST()
150 Cache.init(&Stats, &Allocator); in TEST()
156 TransferBatch *B = Allocator.popBatch(&Cache, ClassId); in TEST()
162 memset(Allocator.decompactPtr(ClassId, B->get(J)), 'B', Size); in TEST()
[all …]
/external/google-fruit/include/fruit/impl/data_structures/
Dfixed_size_vector.defn.h31 template <typename T, typename Allocator>
32 inline FixedSizeVector<T, Allocator>::FixedSizeVector(std::size_t capacity, Allocator allocator) in FixedSizeVector()
42 template <typename T, typename Allocator>
43 inline FixedSizeVector<T, Allocator>::~FixedSizeVector() { in ~FixedSizeVector()
50 template <typename T, typename Allocator>
51 inline FixedSizeVector<T, Allocator>::FixedSizeVector(FixedSizeVector&& other) noexcept : FixedSize… in FixedSizeVector()
55 template <typename T, typename Allocator>
56 inline FixedSizeVector<T, Allocator>& FixedSizeVector<T, Allocator>::operator=(FixedSizeVector&& ot…
61 template <typename T, typename Allocator>
62 inline std::size_t FixedSizeVector<T, Allocator>::size() const { in size()
[all …]
/external/llvm-project/compiler-rt/lib/scudo/standalone/tests/
Dcombined_test.cpp37 bool isTaggedAllocation(AllocatorT *Allocator, scudo::uptr Size, in isTaggedAllocation() argument
39 if (!Allocator->useMemoryTagging() || in isTaggedAllocation()
53 void checkMemoryTaggingMaybe(AllocatorT *Allocator, void *P, scudo::uptr Size, in checkMemoryTaggingMaybe() argument
55 if (!isTaggedAllocation(Allocator, Size, Alignment)) in checkMemoryTaggingMaybe()
73 template <typename Config> struct TestAllocator : scudo::Allocator<Config> {
83 auto Allocator = std::unique_ptr<AllocatorT>(new AllocatorT()); in testAllocator() local
87 Allocator->isOwned(&StaticBuffer[scudo::Chunk::getHeaderSize()])); in testAllocator()
92 EXPECT_FALSE(Allocator->isOwned(&StackBuffer[scudo::Chunk::getHeaderSize()])); in testAllocator()
108 void *P = Allocator->allocate(Size, Origin, Align); in testAllocator()
110 EXPECT_TRUE(Allocator->isOwned(P)); in testAllocator()
[all …]
Dtsd_test.cpp50 template <class Allocator>
51 using TSDRegistryT = scudo::TSDRegistrySharedT<Allocator, 1U, 1U>;
55 template <class Allocator>
56 using TSDRegistryT = scudo::TSDRegistrySharedT<Allocator, 16U, 8U>;
60 template <class Allocator>
61 using TSDRegistryT = scudo::TSDRegistryExT<Allocator>;
70 std::unique_ptr<AllocatorT, decltype(Deleter)> Allocator(new AllocatorT, in TEST() local
72 Allocator->reset(); in TEST()
73 EXPECT_FALSE(Allocator->isInitialized()); in TEST()
75 auto Registry = Allocator->getTSDRegistry(); in TEST()
[all …]
Dprimary_test.cpp30 std::unique_ptr<Primary, decltype(Deleter)> Allocator(new Primary, Deleter); in testPrimary() local
31 Allocator->init(/*ReleaseToOsInterval=*/-1); in testPrimary()
33 Cache.init(nullptr, Allocator.get()); in testPrimary()
49 Allocator->releaseToOS(); in testPrimary()
51 Allocator->getStats(&Str); in testPrimary()
70 Primary Allocator; in TEST() local
71 Allocator.init(/*ReleaseToOsInterval=*/-1); in TEST()
75 Cache.init(&Stats, &Allocator); in TEST()
81 TransferBatch *B = Allocator.popBatch(&Cache, ClassId); in TEST()
91 Allocator.pushBatch(ClassId, Batches.back()); in TEST()
[all …]
/external/scudo/standalone/
Dtsd_exclusive.h25 template <class Allocator> void teardownThread(void *Ptr);
27 template <class Allocator> struct TSDRegistryExT {
28 void initLinkerInitialized(Allocator *Instance) { in initLinkerInitialized()
30 CHECK_EQ(pthread_key_create(&PThreadKey, teardownThread<Allocator>), 0); in initLinkerInitialized()
34 void init(Allocator *Instance) { in init()
39 void initOnceMaybe(Allocator *Instance) { in initOnceMaybe()
47 Allocator *Instance = in unmapTestOnly()
48 reinterpret_cast<Allocator *>(pthread_getspecific(PThreadKey)); in unmapTestOnly()
55 ALWAYS_INLINE void initThreadMaybe(Allocator *Instance, bool MinimalInit) { in initThreadMaybe()
61 ALWAYS_INLINE TSD<Allocator> *getTSDAndLock(bool *UnlockRequired) { in getTSDAndLock()
[all …]
Dwrappers_cpp.cpp19 extern HIDDEN scudo::Allocator<scudo::Config, malloc_postinit> Allocator;
27 return Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
30 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]()
34 return Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
38 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]()
41 return Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
45 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator new[]()
50 return Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
55 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator new[]()
60 Allocator.deallocate(ptr, scudo::Chunk::Origin::New); in operator delete()
[all …]
Dwrappers_c_bionic.cpp23 #define SCUDO_ALLOCATOR Allocator
27 static scudo::Allocator<scudo::AndroidConfig, SCUDO_PREFIX(malloc_postinit)>
41 static scudo::Allocator<scudo::AndroidSvelteConfig,
51 INTERFACE void __scudo_print_stats(void) { Allocator.printStats(); } in __scudo_print_stats()
59 Allocator.getErrorInfo(error_info, fault_addr, stack_depot, region_info, in __scudo_get_error_info()
65 return Allocator.getStackDepotAddress(); in __scudo_get_stack_depot_addr()
73 return Allocator.getRegionInfoArrayAddress(); in __scudo_get_region_info_addr()
77 return Allocator.getRegionInfoArraySize(); in __scudo_get_region_info_size()
81 return Allocator.getRingBufferAddress(); in __scudo_get_ring_buffer_addr()
85 return Allocator.getRingBufferSize(); in __scudo_get_ring_buffer_size()
Dtsd_shared.h25 template <class Allocator, u32 TSDsArraySize, u32 DefaultTSDCount>
27 void initLinkerInitialized(Allocator *Instance) { in initLinkerInitialized()
36 void init(Allocator *Instance) { in init()
41 void initOnceMaybe(Allocator *Instance) { in initOnceMaybe()
50 ALWAYS_INLINE void initThreadMaybe(Allocator *Instance, in initThreadMaybe()
57 ALWAYS_INLINE TSD<Allocator> *getTSDAndLock(bool *UnlockRequired) { in getTSDAndLock()
58 TSD<Allocator> *TSD = getCurrentTSD(); in getTSDAndLock()
107 static_assert(alignof(TSD<Allocator>) >= 2, "");
109 ALWAYS_INLINE void setCurrentTSD(TSD<Allocator> *CurrentTSD) { in setCurrentTSD()
114 ALWAYS_INLINE TSD<Allocator> *getCurrentTSD() { in getCurrentTSD()
[all …]
/external/llvm-project/compiler-rt/lib/scudo/standalone/
Dtsd_exclusive.h25 template <class Allocator> void teardownThread(void *Ptr);
27 template <class Allocator> struct TSDRegistryExT {
28 void initLinkerInitialized(Allocator *Instance) { in initLinkerInitialized()
30 CHECK_EQ(pthread_key_create(&PThreadKey, teardownThread<Allocator>), 0); in initLinkerInitialized()
34 void init(Allocator *Instance) { in init()
41 ALWAYS_INLINE void initThreadMaybe(Allocator *Instance, bool MinimalInit) { in initThreadMaybe()
47 ALWAYS_INLINE TSD<Allocator> *getTSDAndLock(bool *UnlockRequired) { in getTSDAndLock()
83 void initOnceMaybe(Allocator *Instance) { in initOnceMaybe()
93 NOINLINE void initThread(Allocator *Instance, bool MinimalInit) { in initThread()
107 TSD<Allocator> FallbackTSD;
[all …]
Dwrappers_cpp.cpp19 extern HIDDEN scudo::Allocator<scudo::Config, malloc_postinit> Allocator;
27 return Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
30 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]()
34 return Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
38 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]()
41 return Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
45 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator new[]()
50 return Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
55 return Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator new[]()
60 Allocator.deallocate(ptr, scudo::Chunk::Origin::New); in operator delete()
[all …]
Dtsd_shared.h25 template <class Allocator, u32 TSDsArraySize, u32 DefaultTSDCount>
27 void initLinkerInitialized(Allocator *Instance) { in initLinkerInitialized()
36 void init(Allocator *Instance) { in init()
43 ALWAYS_INLINE void initThreadMaybe(Allocator *Instance, in initThreadMaybe()
50 ALWAYS_INLINE TSD<Allocator> *getTSDAndLock(bool *UnlockRequired) { in getTSDAndLock()
51 TSD<Allocator> *TSD = getCurrentTSD(); in getTSDAndLock()
100 static_assert(alignof(TSD<Allocator>) >= 2, "");
102 ALWAYS_INLINE void setCurrentTSD(TSD<Allocator> *CurrentTSD) { in setCurrentTSD()
107 ALWAYS_INLINE TSD<Allocator> *getCurrentTSD() { in getCurrentTSD()
108 return reinterpret_cast<TSD<Allocator> *>(*getTlsPtr() & ~1ULL); in getCurrentTSD()
[all …]
/external/libchrome/base/
Dstl_util.h87 template <typename CharT, typename Traits, typename Allocator>
88 CharT* data(std::basic_string<CharT, Traits, Allocator>& str) { in data()
239 template <typename CharT, typename Traits, typename Allocator, typename Value>
240 void Erase(std::basic_string<CharT, Traits, Allocator>& container, in Erase()
246 template <typename CharT, typename Traits, typename Allocator, class Predicate>
247 void EraseIf(std::basic_string<CharT, Traits, Allocator>& container, in EraseIf()
253 template <class T, class Allocator, class Value>
254 void Erase(std::deque<T, Allocator>& container, const Value& value) { in Erase()
259 template <class T, class Allocator, class Predicate>
260 void EraseIf(std::deque<T, Allocator>& container, Predicate pred) { in EraseIf()
[all …]
/external/llvm/include/llvm/Support/
DAllocator.h145 : CurPtr(nullptr), End(nullptr), BytesAllocated(0), Allocator() {} in BumpPtrAllocatorImpl()
147 BumpPtrAllocatorImpl(T &&Allocator) in BumpPtrAllocatorImpl() argument
149 Allocator(std::forward<T &&>(Allocator)) {} in BumpPtrAllocatorImpl()
157 Allocator(std::move(Old.Allocator)) { in BumpPtrAllocatorImpl()
178 Allocator = std::move(RHS.Allocator);
234 void *NewSlab = Allocator.Allocate(PaddedSize, 0); in Allocate()
309 AllocatorT Allocator; variable
324 void *NewSlab = Allocator.Allocate(AllocatedSlabSize, 0); in StartNewSlab()
340 Allocator.Deallocate(*I, AllocatedSlabSize); in DeallocateSlabs()
349 Allocator.Deallocate(Ptr, Size); in DeallocateCustomSizedSlabs()
[all …]
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DAllocator.h148 : CurPtr(nullptr), End(nullptr), BytesAllocated(0), Allocator() {} in BumpPtrAllocatorImpl()
150 BumpPtrAllocatorImpl(T &&Allocator) in BumpPtrAllocatorImpl() argument
152 Allocator(std::forward<T &&>(Allocator)) {} in BumpPtrAllocatorImpl()
160 Allocator(std::move(Old.Allocator)) { in BumpPtrAllocatorImpl()
181 Allocator = std::move(RHS.Allocator);
237 void *NewSlab = Allocator.Allocate(PaddedSize, 0); in Allocate()
312 AllocatorT Allocator; variable
327 void *NewSlab = Allocator.Allocate(AllocatedSlabSize, 0); in StartNewSlab()
343 Allocator.Deallocate(*I, AllocatedSlabSize); in DeallocateSlabs()
352 Allocator.Deallocate(Ptr, Size); in DeallocateCustomSizedSlabs()
[all …]
/external/clang/include/clang/Basic/
DPartialDiagnostic.h123 StorageAllocator *Allocator; variable
130 if (Allocator) in getStorage()
131 DiagStorage = Allocator->Allocate(); in getStorage()
133 assert(Allocator != reinterpret_cast<StorageAllocator *>(~uintptr_t(0))); in getStorage()
153 if (Allocator) in freeStorageSlow()
154 Allocator->Deallocate(DiagStorage); in freeStorageSlow()
155 else if (Allocator != reinterpret_cast<StorageAllocator *>(~uintptr_t(0))) in freeStorageSlow()
182 : DiagID(0), DiagStorage(nullptr), Allocator(nullptr) { } in PartialDiagnostic()
184 PartialDiagnostic(unsigned DiagID, StorageAllocator &Allocator) in PartialDiagnostic() argument
185 : DiagID(DiagID), DiagStorage(nullptr), Allocator(&Allocator) { } in PartialDiagnostic()
[all …]
/external/llvm-project/llvm/include/llvm/Support/
DAllocator.h82 BumpPtrAllocatorImpl(T &&Allocator) in BumpPtrAllocatorImpl() argument
83 : Allocator(std::forward<T &&>(Allocator)) {} in BumpPtrAllocatorImpl()
91 Allocator(std::move(Old.Allocator)) { in BumpPtrAllocatorImpl()
113 Allocator = std::move(RHS.Allocator);
173 void *NewSlab = Allocator.Allocate(PaddedSize, alignof(std::max_align_t)); in Allocate()
319 AllocatorT Allocator; variable
336 Allocator.Allocate(AllocatedSlabSize, alignof(std::max_align_t)); in StartNewSlab()
352 Allocator.Deallocate(*I, AllocatedSlabSize, alignof(std::max_align_t)); in DeallocateSlabs()
361 Allocator.Deallocate(Ptr, Size, alignof(std::max_align_t)); in DeallocateCustomSizedSlabs()
378 BumpPtrAllocator Allocator; variable
[all …]
/external/scudo/standalone/benchmarks/
Dmalloc_benchmark.cpp20 reinterpret_cast<scudo::Allocator<Config> *>(CurrentAllocator)->initGwpAsan(); in PostInitCallback()
24 using AllocatorT = scudo::Allocator<Config, PostInitCallback<Config>>; in BM_malloc_free()
29 std::unique_ptr<AllocatorT, decltype(Deleter)> Allocator(new AllocatorT, in BM_malloc_free() local
31 CurrentAllocator = Allocator.get(); in BM_malloc_free()
32 Allocator->reset(); in BM_malloc_free()
38 void *Ptr = Allocator->allocate(NBytes, scudo::Chunk::Origin::Malloc); in BM_malloc_free()
43 Allocator->deallocate(Ptr, scudo::Chunk::Origin::Malloc); in BM_malloc_free()
65 using AllocatorT = scudo::Allocator<Config, PostInitCallback<Config>>; in BM_malloc_free_loop()
70 std::unique_ptr<AllocatorT, decltype(Deleter)> Allocator(new AllocatorT, in BM_malloc_free_loop() local
72 CurrentAllocator = Allocator.get(); in BM_malloc_free_loop()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DAllocator.h153 BumpPtrAllocatorImpl(T &&Allocator) in BumpPtrAllocatorImpl() argument
154 : Allocator(std::forward<T &&>(Allocator)) {} in BumpPtrAllocatorImpl()
162 Allocator(std::move(Old.Allocator)) { in BumpPtrAllocatorImpl()
184 Allocator = std::move(RHS.Allocator);
244 void *NewSlab = Allocator.Allocate(PaddedSize, 0); in Allocate()
390 AllocatorT Allocator; variable
405 void *NewSlab = Allocator.Allocate(AllocatedSlabSize, 0); in StartNewSlab()
421 Allocator.Deallocate(*I, AllocatedSlabSize); in DeallocateSlabs()
430 Allocator.Deallocate(Ptr, Size); in DeallocateCustomSizedSlabs()
447 BumpPtrAllocator Allocator; variable
[all …]
/external/swiftshader/third_party/marl/src/
Dosfiber_asm.h65 inline OSFiber(Allocator*);
70 MARL_NO_EXPORT static inline Allocator::unique_ptr<OSFiber>
71 createFiberFromCurrentThread(Allocator* allocator);
76 MARL_NO_EXPORT static inline Allocator::unique_ptr<OSFiber> createFiber(
77 Allocator* allocator,
89 Allocator* allocator;
95 OSFiber::OSFiber(Allocator* allocator) : allocator(allocator) {} in OSFiber()
103 Allocator::unique_ptr<OSFiber> OSFiber::createFiberFromCurrentThread( in createFiberFromCurrentThread()
104 Allocator* allocator) { in createFiberFromCurrentThread()
110 Allocator::unique_ptr<OSFiber> OSFiber::createFiber( in createFiber()
[all …]
Dosfiber_ucontext.h38 inline OSFiber(Allocator*);
43 static inline Allocator::unique_ptr<OSFiber> createFiberFromCurrentThread(
44 Allocator* allocator);
49 static inline Allocator::unique_ptr<OSFiber> createFiber(
50 Allocator* allocator,
59 Allocator* allocator;
65 OSFiber::OSFiber(Allocator* allocator) : allocator(allocator) {} in OSFiber()
73 Allocator::unique_ptr<OSFiber> OSFiber::createFiberFromCurrentThread( in createFiberFromCurrentThread()
74 Allocator* allocator) { in createFiberFromCurrentThread()
81 Allocator::unique_ptr<OSFiber> OSFiber::createFiber( in createFiber()
[all …]
/external/llvm-project/libcxx/test/std/containers/sequences/deque/deque.cons/
Dsize.pass.cpp22 template <class T, class Allocator>
27 typedef std::deque<T, Allocator> C; in test2()
31 C d(n, Allocator()); in test2()
44 template <class T, class Allocator>
48 typedef std::deque<T, Allocator> C; in test1()
64 template <class T, class Allocator>
66 test3(unsigned n, Allocator const &alloc = Allocator()) in test3()
69 typedef std::deque<T, Allocator> C; in test3()
81 template <class T, class Allocator>
85 test1<T, Allocator> ( n ); in test()
[all …]
/external/libcxx/test/std/containers/sequences/deque/deque.cons/
Dsize.pass.cpp23 template <class T, class Allocator>
28 typedef std::deque<T, Allocator> C; in test2()
32 C d(n, Allocator()); in test2()
45 template <class T, class Allocator>
49 typedef std::deque<T, Allocator> C; in test1()
65 template <class T, class Allocator>
67 test3(unsigned n, Allocator const &alloc = Allocator()) in test3()
70 typedef std::deque<T, Allocator> C; in test3()
82 template <class T, class Allocator>
86 test1<T, Allocator> ( n ); in test()
[all …]

12345678910>>...44