Home
last modified time | relevance | path

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

12345678910>>...16

/llvm-project-15.0.7/compiler-rt/lib/scudo/standalone/tests/
H A Dcombined_test.cpp132 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
147 auto *Allocator = this->Allocator.get(); in BasicTest() local
198 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
215 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
233 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
260 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
278 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
299 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
320 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
343 auto *Allocator = this->Allocator.get(); in SCUDO_TYPED_TEST() local
[all …]
H A Dtsd_test.cpp60 template <class Allocator>
65 template <class Allocator>
70 template <class Allocator>
82 EXPECT_FALSE(Allocator->isInitialized()); in TEST()
84 auto Registry = Allocator->getTSDRegistry(); in TEST()
85 Registry->init(Allocator.get()); in TEST()
86 EXPECT_TRUE(Allocator->isInitialized()); in TEST()
96 EXPECT_FALSE(Allocator->isInitialized()); in testRegistry()
98 auto Registry = Allocator->getTSDRegistry(); in testRegistry()
100 EXPECT_TRUE(Allocator->isInitialized()); in testRegistry()
[all …]
H A Dsecondary_test.cpp115 std::unique_ptr<LargeAllocator> Allocator = member
142 Allocator->deallocate(Options, P); in TEST_F()
147 Allocator->getStats(&Str); in TEST_F()
160 Allocator->disable(); in TEST_F()
161 Allocator->iterateOverBlocks(Lambda); in TEST_F()
162 Allocator->enable(); in TEST_F()
164 Allocator->deallocate(Options, V.back()); in TEST_F()
168 Allocator->getStats(&Str); in TEST_F()
178 if (Allocator->canCache(0U)) { in TEST_F()
213 Allocator->deallocate(Options, P); in performAllocations()
[all …]
H A Dprimary_test.cpp140 Allocator->releaseToOS(); in SCUDO_TYPED_TEST()
142 Allocator->getStats(&Str); in SCUDO_TYPED_TEST()
163 Primary Allocator; in TEST() local
188 Allocator.releaseToOS(); in TEST()
190 Allocator.getStats(&Str); in TEST()
193 Allocator.unmapTestOnly(); in TEST()
216 Allocator->disable(); in SCUDO_TYPED_TEST()
218 Allocator->enable(); in SCUDO_TYPED_TEST()
226 Allocator->releaseToOS(); in SCUDO_TYPED_TEST()
228 Allocator->getStats(&Str); in SCUDO_TYPED_TEST()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/scudo/standalone/
H A Dtsd_exclusive.h27 template <class Allocator> struct TSDRegistryExT {
28 void init(Allocator *Instance) { in init()
36 void initOnceMaybe(Allocator *Instance) { in initOnceMaybe()
43 void unmapTestOnly(Allocator *Instance) { in unmapTestOnly()
118 TSD<Allocator> FallbackTSD;
121 static thread_local TSD<Allocator> ThreadTSD;
126 template <class Allocator>
127 thread_local TSD<Allocator> TSDRegistryExT<Allocator>::ThreadTSD;
128 template <class Allocator>
132 typedef TSDRegistryExT<Allocator> TSDRegistryT; in teardownThread()
[all …]
H A Dwrappers_cpp.cpp25 return Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
32 return Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
39 return Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
48 return Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
58 Allocator.deallocate(ptr, scudo::Chunk::Origin::New); in operator delete()
61 Allocator.deallocate(ptr, scudo::Chunk::Origin::NewArray); in operator delete[]()
65 Allocator.deallocate(ptr, scudo::Chunk::Origin::New); in operator delete()
69 Allocator.deallocate(ptr, scudo::Chunk::Origin::NewArray); in operator delete[]()
79 Allocator.deallocate(ptr, scudo::Chunk::Origin::New, 0, in operator delete()
89 Allocator.deallocate(ptr, scudo::Chunk::Origin::New, 0, in operator delete()
[all …]
H A 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()
H A Dtsd_shared.h27 void init(Allocator *Instance) { in init()
38 void initOnceMaybe(Allocator *Instance) { in initOnceMaybe()
45 void unmapTestOnly(Allocator *Instance) { in unmapTestOnly()
54 ALWAYS_INLINE void initThreadMaybe(Allocator *Instance, in initThreadMaybe()
62 TSD<Allocator> *TSD = getCurrentTSD(); in getTSDAndLock()
111 static_assert(alignof(TSD<Allocator>) >= 2, "");
118 ALWAYS_INLINE TSD<Allocator> *getCurrentTSD() { in getCurrentTSD()
153 NOINLINE void initThread(Allocator *Instance) { in initThread()
161 NOINLINE TSD<Allocator> *getTSDAndLockSlow(TSD<Allocator> *CurrentTSD) { in getTSDAndLockSlow()
176 TSD<Allocator> *CandidateTSD = nullptr; in getTSDAndLockSlow()
[all …]
H A Dtsd.h26 template <class Allocator> struct alignas(SCUDO_CACHE_LINE_SIZE) TSD { in alignas()
27 typename Allocator::CacheT Cache; in alignas()
28 typename Allocator::QuarantineCacheT QuarantineCache; in alignas()
29 using ThisT = TSD<Allocator>; in alignas()
32 void init(Allocator *Instance) { in alignas()
39 void commitBack(Allocator *Instance) { Instance->commitBack(this); } in alignas()
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/deque/deque.cons/
H A 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 …]
/llvm-project-15.0.7/compiler-rt/lib/scudo/standalone/benchmarks/
H A 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()
37 void *Ptr = Allocator->allocate(NBytes, scudo::Chunk::Origin::Malloc); in BM_malloc_free()
42 Allocator->deallocate(Ptr, scudo::Chunk::Origin::Malloc); in BM_malloc_free()
64 using AllocatorT = scudo::Allocator<Config, PostInitCallback<Config>>; in BM_malloc_free_loop()
69 std::unique_ptr<AllocatorT, decltype(Deleter)> Allocator(new AllocatorT, in BM_malloc_free_loop() local
71 CurrentAllocator = Allocator.get(); in BM_malloc_free_loop()
80 Ptr = Allocator->allocate(1 << SizeLog2, scudo::Chunk::Origin::Malloc); in BM_malloc_free_loop()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/DebugInfo/MSF/
H A DMappedBlockStream.h43 BinaryStreamRef MsfData, BumpPtrAllocator &Allocator);
47 uint32_t StreamIndex, BumpPtrAllocator &Allocator);
51 BumpPtrAllocator &Allocator);
55 BumpPtrAllocator &Allocator);
68 BumpPtrAllocator &getAllocator() { return Allocator; } in getAllocator()
78 BinaryStreamRef MsfData, BumpPtrAllocator &Allocator);
101 BumpPtrAllocator &Allocator; variable
113 uint32_t StreamIndex, BumpPtrAllocator &Allocator);
118 BumpPtrAllocator &Allocator);
122 BumpPtrAllocator &Allocator, bool AltFpm = false);
[all …]
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/vector.bool/
H A Dctor_exceptions.pass.cpp21 struct Allocator { struct
26 Allocator(const Allocator<U>&) {} in Allocator() function
28 Allocator(bool should_throw = true) { in Allocator() argument
36 friend bool operator==(const Allocator&, const Allocator&) { return false; } in operator ==() argument
80 using AllocVec = std::vector<bool, Allocator<bool> >; in main()
84 Allocator<bool> alloc(false); in main()
126 Allocator<bool> alloc(false); in main()
134 Allocator<bool> alloc(false); in main()
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A DRecyclingAllocator.h34 AllocatorType Allocator; variable
37 ~RecyclingAllocator() { Base.clear(Allocator); } in ~RecyclingAllocator()
43 SubClass *Allocate() { return Base.template Allocate<SubClass>(Allocator); } in Allocate()
45 T *Allocate() { return Base.Allocate(Allocator); } in Allocate()
51 void Deallocate(SubClass* E) { return Base.Deallocate(Allocator, E); } in Deallocate()
54 Allocator.PrintStats(); in PrintStats()
64 T, Size, Align> &Allocator) { in new() argument
66 return Allocator.Allocate(); in new()
H A DAllocator.h81 BumpPtrAllocatorImpl(T &&Allocator) in BumpPtrAllocatorImpl() argument
82 : AllocTy(std::forward<T &&>(Allocator)) {} in BumpPtrAllocatorImpl()
383 BumpPtrAllocator Allocator; variable
389 Allocator.setRedZoneSize(0); in SpecificBumpPtrAllocator()
392 : Allocator(std::move(Old.Allocator)) {} in SpecificBumpPtrAllocator()
396 Allocator = std::move(RHS.Allocator);
410 for (auto I = Allocator.Slabs.begin(), E = Allocator.Slabs.end(); I != E; in DestroyAll()
413 std::distance(Allocator.Slabs.begin(), I)); in DestroyAll()
415 char *End = *I == Allocator.Slabs.back() ? Allocator.CurPtr in DestroyAll()
421 for (auto &PtrAndSize : Allocator.CustomSizedSlabs) { in DestroyAll()
[all …]
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/vector/vector.cons/
H A Dexceptions.pass.cpp21 struct Allocator { struct
25 Allocator(bool should_throw = true) { in Allocator() argument
33 friend bool operator==(const Allocator&, const Allocator&) { return false; } in operator ==() argument
100 using AllocVec = std::vector<int, Allocator<int> >; in main()
123 Allocator<int> alloc(false); in main()
171 Allocator<int> alloc(false); in main()
179 Allocator<int> alloc(false); in main()
204 std::vector<ThrowingT, Allocator<ThrowingT> > vec(Allocator<ThrowingT>(false)); in main()
207 std::vector<ThrowingT, Allocator<ThrowingT> > vec2(std::move(vec), Allocator<ThrowingT>(false)); in main()
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dcoroutine-allocs.cpp8 struct Allocator {}; struct
12 void *operator new(std::size_t sz, Allocator &);
43 resumable f2(Allocator &&) { in f2() argument
47 resumable f3(Allocator &) { in f3() argument
51 resumable f4(Allocator) { in f4() argument
55 resumable f5(const Allocator) { // expected-error {{operator new' provided by 'std::coroutine_trait… in f5() argument
59 resumable f6(const Allocator &) { // expected-error {{operator new' provided by 'std::coroutine_tra… in f6() argument
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/vector/
H A Dtypes.pass.cpp45 template <class T, class Allocator>
49 typedef std::vector<T, Allocator> C; in test()
55 … static_assert((std::is_same<typename C::value_type, typename Allocator::value_type>::value), ""); in test()
56 static_assert((std::is_same<typename C::allocator_type, Allocator>::value), ""); in test()
57 static_assert((std::is_same<typename C::size_type, typename Allocator::size_type>::value), ""); in test()
58 …static_assert((std::is_same<typename C::difference_type, typename Allocator::difference_type>::val… in test()
59 static_assert((std::is_same<typename C::reference, typename Allocator::reference>::value), ""); in test()
60 …static_assert((std::is_same<typename C::const_reference, typename Allocator::const_reference>::val… in test()
61 static_assert((std::is_same<typename C::pointer, typename Allocator::pointer>::value), ""); in test()
62 …static_assert((std::is_same<typename C::const_pointer, typename Allocator::const_pointer>::value),… in test()
/llvm-project-15.0.7/llvm/unittests/Support/
H A DArrayRecyclerTest.cpp51 BumpPtrAllocator Allocator; in TEST() local
55 Object *A1 = DUT.allocate(Cap, Allocator); in TEST()
59 Object *A2 = DUT.allocate(Cap, Allocator); in TEST()
63 Object *A3 = DUT.allocate(Cap, Allocator); in TEST()
83 Object *A2x = DUT.allocate(Cap, Allocator); in TEST()
92 Object *A3x = DUT.allocate(Cap, Allocator); in TEST()
94 Object *A1x = DUT.allocate(Cap, Allocator); in TEST()
96 Object *A2y = DUT.allocate(Cap, Allocator); in TEST()
100 Object *A4 = DUT.allocate(Cap, Allocator); in TEST()
105 DUT.clear(Allocator); in TEST()
/llvm-project-15.0.7/llvm/unittests/DebugInfo/MSF/
H A DMappedBlockStreamTest.cpp69 BumpPtrAllocator Allocator; member in __anon8ef2c6610111::DiscontiguousStream
111 EXPECT_EQ(0U, F.Allocator.getBytesAllocated()); in TEST()
125 EXPECT_EQ(0U, F.Allocator.getBytesAllocated()); in TEST()
130 EXPECT_EQ(0U, F.Allocator.getBytesAllocated()); in TEST()
158 EXPECT_EQ(0U, F.Allocator.getBytesAllocated()); in TEST()
172 EXPECT_EQ(0U, F.Allocator.getBytesAllocated()); in TEST()
185 EXPECT_EQ(0U, F.Allocator.getBytesAllocated()); in TEST()
198 EXPECT_EQ(0U, F.Allocator.getBytesAllocated()); in TEST()
213 EXPECT_EQ(7U, F.Allocator.getBytesAllocated()); in TEST()
219 EXPECT_EQ(7U, F.Allocator.getBytesAllocated()); in TEST()
[all …]
/llvm-project-15.0.7/llvm/lib/DebugInfo/MSF/
H A DMappedBlockStream.cpp47 BumpPtrAllocator &Allocator) in MappedBlockStream() argument
49 Allocator(Allocator) {} in MappedBlockStream()
53 BumpPtrAllocator &Allocator) { in createStream() argument
55 BlockSize, Layout, MsfData, Allocator); in createStream()
60 BumpPtrAllocator &Allocator) { in createIndexedStream() argument
66 Layout.SB->BlockSize, SL, MsfData, Allocator); in createIndexedStream()
76 return createStream(Layout.SB->BlockSize, SL, MsfData, Allocator); in createDirectoryStream()
82 BumpPtrAllocator &Allocator) { in createFpmStream() argument
312 : ReadInterface(BlockSize, Layout, MsfData, Allocator), in WritableMappedBlockStream()
321 BlockSize, Layout, MsfData, Allocator); in createStream()
[all …]
/llvm-project-15.0.7/libcxx/test/std/strings/basic.string/
H A Dtypes.pass.cpp43 template <class Traits, class Allocator>
47 typedef std::basic_string<typename Traits::char_type, Traits, Allocator> S; in test()
51 … static_assert((std::is_same<typename S::value_type, typename Allocator::value_type>::value), ""); in test()
52 static_assert((std::is_same<typename S::allocator_type, Allocator>::value), ""); in test()
53 …static_assert((std::is_same<typename S::size_type, typename std::allocator_traits<Allocator>::size… in test()
54 …td::is_same<typename S::difference_type, typename std::allocator_traits<Allocator>::difference_typ… in test()
57 …static_assert((std::is_same<typename S::pointer, typename std::allocator_traits<Allocator>::pointe… in test()
58 …static_assert((std::is_same<typename S::const_pointer, typename std::allocator_traits<Allocator>::… in test()
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/deque/
H A Dtypes.pass.cpp43 template <class T, class Allocator>
47 typedef std::deque<T, Allocator> C; in test()
50 … static_assert((std::is_same<typename C::value_type, typename Allocator::value_type>::value), ""); in test()
51 static_assert((std::is_same<typename C::allocator_type, Allocator>::value), ""); in test()
52 static_assert((std::is_same<typename C::size_type, typename Allocator::size_type>::value), ""); in test()
53 …static_assert((std::is_same<typename C::difference_type, typename Allocator::difference_type>::val… in test()
54 static_assert((std::is_same<typename C::reference, typename Allocator::reference>::value), ""); in test()
55 …static_assert((std::is_same<typename C::const_reference, typename Allocator::const_reference>::val… in test()
56 static_assert((std::is_same<typename C::pointer, typename Allocator::pointer>::value), ""); in test()
57 …static_assert((std::is_same<typename C::const_pointer, typename Allocator::const_pointer>::value),… in test()
/llvm-project-15.0.7/flang/include/flang/Runtime/
H A Dmemory.h61 template <typename A> struct Allocator { struct
63 explicit Allocator(const Terminator &t) : terminator{t} {} in Allocator() function
65 explicit constexpr Allocator(const Allocator<B> &that) noexcept in Allocator() function
67 Allocator(const Allocator &) = default;
68 Allocator(Allocator &&) = default;
/llvm-project-15.0.7/clang/include/clang/Basic/
H A DPartialDiagnostic.h51 Allocator = Other.Allocator; in PartialDiagnostic()
76 Allocator = Other.Allocator; in PartialDiagnostic()
84 Allocator = reinterpret_cast<DiagStorageAllocator *>(~uintptr_t(0)); in PartialDiagnostic()
92 Allocator = &Allocator_; in PartialDiagnostic()
129 Allocator = Other.Allocator;
138 std::swap(Allocator, PD.Allocator); in swap()

12345678910>>...16