| /llvm-project-15.0.7/llvm/unittests/Support/ |
| H A D | AllocatorTest.cpp | 51 Alloc.Allocate(3000, 1); in TEST() 53 Alloc.Allocate(3000, 1); in TEST() 55 Alloc.Allocate(3000, 1); in TEST() 70 Alloc.Allocate(3000, 1); in TEST() 72 Alloc.Allocate(3000, 1); in TEST() 76 Alloc.Allocate(3000, 1); in TEST() 78 Alloc.Allocate(3000, 1); in TEST() 134 Alloc.Allocate(4096, 1); in TEST() 138 Alloc.Allocate(1, 1); in TEST() 146 Alloc.Allocate(8000, 1); in TEST() [all …]
|
| /llvm-project-15.0.7/clang/test/Analysis/inlining/ |
| H A D | placement-new-fp-suppression.cpp | 44 void *Allocate(size_t Size, size_t /*Alignment*/) { in Allocate() function in MallocAllocator 51 void *Allocate(size_t Size, size_t Alignment) { in Allocate() function in BumpPtrAllocator 57 uintptr_t AlignedAddr = alignAddr(Allocator.Allocate(PaddedSize, 0), in Allocate() 81 void *Allocate(size_t Size, unsigned Align = 8) const { in Allocate() function in ASTContext 82 return BumpAlloc.Allocate(Size, Align); in Allocate() 86 T *Allocate(size_t Num = 1) const { in Allocate() function in ASTContext 87 return static_cast<T *>(Allocate(Num * sizeof(T), alignof(T))); in Allocate() 98 return C.Allocate(Bytes, Alignment); in operator new() 103 return C.Allocate(Bytes, Alignment); in operator new[]()
|
| /llvm-project-15.0.7/compiler-rt/lib/xray/tests/unit/ |
| H A D | allocator_test.cpp | 27 TEST(AllocatorTest, Allocate) { in TEST() argument 29 auto B = A.Allocate(); in TEST() 35 auto B1 = A.Allocate(); in TEST() 37 auto B2 = A.Allocate(); in TEST() 53 for (auto B = A.Allocate(); B.Data != nullptr; B = A.Allocate(), ++C) in TEST() 72 for (auto B = A.Allocate(); B.Data != nullptr; B = A.Allocate(), ++C) in TEST()
|
| /llvm-project-15.0.7/mlir/lib/Tools/PDLL/AST/ |
| H A D | Nodes.cpp | 22 char *data = ctx.getAllocator().Allocate<char>(str.size() + 1); in copyStringWithNull() 33 return *new (ctx.getAllocator().Allocate<Name>()) in create() 236 return new (ctx.getAllocator().Allocate<RewriteStmt>()) in create() 245 return new (ctx.getAllocator().Allocate<ReturnStmt>()) in create() 255 return new (ctx.getAllocator().Allocate<AttributeExpr>()) in create() 281 return new (ctx.getAllocator().Allocate<DeclRefExpr>()) in create() 353 return new (ctx.getAllocator().Allocate<TypeExpr>()) in create() 371 return new (ctx.getAllocator().Allocate<AttrConstraintDecl>()) in create() 384 return new (ctx.getAllocator().Allocate<OpConstraintDecl>()) in create() 397 return new (ctx.getAllocator().Allocate<TypeConstraintDecl>()) in create() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Support/ |
| H A D | AllocatorBase.h | 38 void *Allocate(size_t Size, size_t Alignment) { in Allocate() function 41 &AllocatorBase::Allocate) != in Allocate() 43 &DerivedT::Allocate), in Allocate() 47 return static_cast<DerivedT *>(this)->Allocate(Size, Alignment); in Allocate() 69 template <typename T> T *Allocate(size_t Num = 1) { 70 return static_cast<T *>(Allocate(Num * sizeof(T), alignof(T))); 85 LLVM_ATTRIBUTE_RETURNS_NONNULL void *Allocate(size_t Size, size_t Alignment) { in Allocate() function 90 using AllocatorBase<MallocAllocator>::Allocate;
|
| H A D | RecyclingAllocator.h | 43 SubClass *Allocate() { return Base.template Allocate<SubClass>(Allocator); } in Allocate() function 45 T *Allocate() { return Base.Allocate(Allocator); } in Allocate() function 66 return Allocator.Allocate(); in new()
|
| H A D | Recycler.h | 83 SubClass *Allocate(AllocatorType &Allocator) { in Allocate() function 89 : static_cast<SubClass *>(Allocator.Allocate(Size, Align)); in Allocate() 93 T *Allocate(AllocatorType &Allocator) { in Allocate() function 94 return Allocate<T>(Allocator); in Allocate()
|
| H A D | Allocator.h | 148 LLVM_ATTRIBUTE_RETURNS_NONNULL void *Allocate(size_t Size, Align Alignment) { in Allocate() function 180 this->getAllocator().Allocate(PaddedSize, alignof(std::max_align_t)); in Allocate() 207 Allocate(size_t Size, size_t Alignment) { in Allocate() function 209 return Allocate(Size, Align(Alignment)); in Allocate() 213 using AllocatorBase<BumpPtrAllocatorImpl>::Allocate; 339 void *NewSlab = this->getAllocator().Allocate(AllocatedSlabSize, in StartNewSlab() 432 T *Allocate(size_t num = 1) { return Allocator.Allocate<T>(num); } 443 return Allocator.Allocate(Size, std::min((size_t)llvm::NextPowerOf2(Size), in new()
|
| /llvm-project-15.0.7/libcxx/benchmarks/ |
| H A D | allocation.bench.cpp | 21 static void* Allocate(size_t N) { in Allocate() function 32 static void* Allocate(size_t N) { in Allocate() function 43 static void* Allocate(size_t N) { in Allocate() function 54 static void* Allocate(size_t N) { in Allocate() function 68 void* p = AllocWrapper::Allocate(alloc_size); in BM_AllocateAndDeallocate() 81 PointerList* p = (PointerList*)AllocWrapper::Allocate(alloc_size); in BM_AllocateOnly() 102 p = AllocWrapper::Allocate(alloc_size); in BM_DeallocateOnly()
|
| /llvm-project-15.0.7/clang/lib/AST/ |
| H A D | ExprCXX.cpp | 256 Ctx.Allocate(totalSizeToAlloc<Stmt *, SourceRange>( in Create() 270 Ctx.Allocate(totalSizeToAlloc<Stmt *, SourceRange>( in CreateEmpty() 377 void *Mem = Context.Allocate(Size, alignof(UnresolvedLookupExpr)); in Create() 395 void *Mem = Context.Allocate(Size, alignof(UnresolvedLookupExpr)); in Create() 408 void *Mem = Context.Allocate(Size, alignof(UnresolvedLookupExpr)); in CreateEmpty() 487 void *Mem = Context.Allocate(Size); in Create() 500 void *Mem = Context.Allocate(Size); in CreateEmpty() 1180 void *Mem = Context.Allocate(Size); in Create() 1190 void *Mem = C.Allocate(Size); in CreateDeserialized() 1358 void *Mem = Context.Allocate(totalSizeToAlloc<Expr *>(NumArgs)); in CreateEmpty() [all …]
|
| H A D | OpenMPClause.cpp | 1045 void *Mem = C.Allocate( in Create() 1150 void *Mem = C.Allocate( in Create() 1171 void *Mem = C.Allocate( in CreateEmpty() 1203 void *Mem = C.Allocate( in Create() 1221 void *Mem = C.Allocate( in CreateEmpty() 1253 void *Mem = C.Allocate( in Create() 1273 void *Mem = C.Allocate( in CreateEmpty() 1315 void *Mem = C.Allocate( in Create() 1334 void *Mem = C.Allocate( in CreateEmpty() 1364 void *Mem = C.Allocate( in Create() [all …]
|
| H A D | StmtCXX.cpp | 28 void *Mem = C.Allocate(Size, alignof(CXXTryStmt)); in Create() 35 void *Mem = C.Allocate(Size, alignof(CXXTryStmt)); in Create() 91 void *Mem = C.Allocate(Size, alignof(CoroutineBodyStmt)); in Create() 100 void *Mem = C.Allocate(Size, alignof(CoroutineBodyStmt)); in Create() 118 SubStmts[CoroutineBodyStmt::Allocate] = Args.Allocate; in CoroutineBodyStmt()
|
| H A D | ExprConcepts.cpp | 81 void *Buffer = C.Allocate(totalSizeToAlloc<TemplateArgument>( in Create() 120 void *Buffer = C.Allocate(totalSizeToAlloc<TemplateArgument>( in Create() 130 void *Buffer = C.Allocate(totalSizeToAlloc<TemplateArgument>( in Create() 200 C.Allocate(totalSizeToAlloc<ParmVarDecl *, concepts::Requirement *>( in Create() 211 C.Allocate(totalSizeToAlloc<ParmVarDecl *, concepts::Requirement *>( in Create()
|
| /llvm-project-15.0.7/compiler-rt/lib/lsan/ |
| H A D | lsan_allocator.cpp | 85 void *Allocate(const StackTrace &stack, uptr size, uptr alignment, in Allocate() function 96 void *p = allocator.Allocate(GetAllocatorCache(), size, alignment); in Allocate() 118 return Allocate(stack, size, 1, true); in Calloc() 163 void *ptr = Allocate(stack, size, alignment, kAlwaysClearMemory); in lsan_posix_memalign() 179 return SetErrnoOnNull(Allocate(stack, size, alignment, kAlwaysClearMemory)); in lsan_aligned_alloc() 189 return SetErrnoOnNull(Allocate(stack, size, alignment, kAlwaysClearMemory)); in lsan_memalign() 193 return SetErrnoOnNull(Allocate(stack, size, 1, kAlwaysClearMemory)); in lsan_malloc() 221 Allocate(stack, size, GetPageSizeCached(), kAlwaysClearMemory)); in lsan_valloc() 234 return SetErrnoOnNull(Allocate(stack, size, PageSize, kAlwaysClearMemory)); in lsan_pvalloc()
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Posix/ |
| H A D | new_array_cookie_with_new_from_class.cpp | 15 void *operator new(size_t s) { return Allocate(s); } in operator new() 16 void *operator new[] (size_t s) { return Allocate(s); } in operator new[]() 19 static void *Allocate(size_t s) { in Allocate() function
|
| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/tests/ |
| H A D | sanitizer_allocator_testlib.cpp | 104 void *p = allocator.Allocate(&cache, size, 8); in malloc() 120 void *p = allocator.Allocate(&cache, size, 8, false); in calloc() 143 void *p = allocator.Allocate(&cache, size, alignment); in memalign() 152 *memptr = allocator.Allocate(&cache, size, alignment); in posix_memalign() 162 void *p = allocator.Allocate(&cache, size, GetPageSizeCached()); in valloc()
|
| H A D | sanitizer_allocator_test.cpp | 435 void *x = cache.Allocate(a, max_size_class); in SizeClassAllocatorGetBlockBeginStress() 567 void *x = a.Allocate(&stats, 1 << 20, 1); in TEST() 627 char *x = (char *)a.Allocate(&stats, size, 1); in TEST() 690 EXPECT_EQ(a->Allocate(&cache, -1, 1), (void*)0); in TestCombinedAllocator() 705 void *x = a->Allocate(&cache, size, 1); in TestCombinedAllocator() 850 static_allocator_cache.Allocate(a, 10); in AllocatorLeakTestWorker() 899 main_cache.Allocate(&allocator, class_id)); in TEST() 981 void *x = cache.Allocate(a, class_id0); in TestSizeClassAllocatorIteration() 1132 p[i] = (char*)cache.Allocate(a, Class2); in TEST() 1138 EXPECT_EQ(cache.Allocate(a, Class2), nullptr); in TEST() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_allocator_combined.h | 44 void *Allocate(AllocatorCache *cache, uptr size, uptr alignment) { in Allocate() function 69 res = cache->Allocate(&primary_, primary_.ClassID(size)); in Allocate() 71 res = secondary_.Allocate(&stats_, original_size, alignment); in Allocate() 100 return Allocate(cache, new_size, alignment); in Reallocate() 108 void *new_p = Allocate(cache, new_size, alignment); in Reallocate()
|
| H A D | sanitizer_allocator_dlsym.h | 34 static void *Allocate(uptr size_in_bytes) { in Allocate() function 58 return Allocate(new_size); in Realloc() 66 void *new_ptr = Allocate(new_size); in Realloc()
|
| /llvm-project-15.0.7/compiler-rt/lib/memprof/ |
| H A D | memprof_allocator.cpp | 340 void *Allocate(uptr size, uptr alignment, BufferedStackTrace *stack, in Allocate() function 383 allocated = allocator.Allocate(cache, needed_size, 8); in Allocate() 387 allocated = allocator.Allocate(cache, needed_size, 8); in Allocate() 493 void *new_ptr = Allocate(new_size, 8, stack, FROM_MALLOC); in Reallocate() 509 void *ptr = Allocate(nmemb * size, 8, stack, FROM_MALLOC); in Calloc() 597 return SetErrnoOnNull(instance.Allocate(size, 8, stack, FROM_MALLOC)); in memprof_malloc() 617 return SetErrnoOnNull(instance.Allocate(size, 8, stack, FROM_MALLOC)); in memprof_realloc() 631 instance.Allocate(size, GetPageSizeCached(), stack, FROM_MALLOC)); in memprof_valloc() 644 return SetErrnoOnNull(instance.Allocate(size, PageSize, stack, FROM_MALLOC)); in memprof_pvalloc() 655 return SetErrnoOnNull(instance.Allocate(size, alignment, stack, alloc_type)); in memprof_memalign() [all …]
|
| /llvm-project-15.0.7/clang/test/CXX/temp/temp.spec/temp.inst/ |
| H A D | p11.cpp | 9 void Allocate(unsigned Alignment in Allocate() function 13 void f1(A<int> x) { x.Allocate(); } in f1()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/ |
| H A D | SymbolManager.cpp | 173 SD = (SymExpr*) BPAlloc.Allocate<SymbolRegionValue>(); in getRegionValueSymbol() 192 SD = (SymExpr*) BPAlloc.Allocate<SymbolConjured>(); in conjureSymbol() 209 SD = (SymExpr*) BPAlloc.Allocate<SymbolDerived>(); in getDerivedSymbol() 225 SD = (SymExpr*) BPAlloc.Allocate<SymbolExtent>(); in getExtentSymbol() 243 SD = (SymExpr*) BPAlloc.Allocate<SymbolMetadata>(); in getMetadataSymbol() 260 data = (SymbolCast*) BPAlloc.Allocate<SymbolCast>(); in getCastSymbol() 278 data = (SymIntExpr*) BPAlloc.Allocate<SymIntExpr>(); in getSymIntExpr() 296 data = (IntSymExpr*) BPAlloc.Allocate<IntSymExpr>(); in getIntSymExpr() 314 data = (SymSymExpr*) BPAlloc.Allocate<SymSymExpr>(); in getSymSymExpr() 330 data = (UnarySymExpr *)BPAlloc.Allocate<UnarySymExpr>(); in getUnarySymExpr()
|
| /llvm-project-15.0.7/mlir/lib/Interfaces/ |
| H A D | SideEffectInterfaces.cpp | 27 return isa<Allocate, Free, Read, Write>(effect); in classof() 71 if (isa<MemoryEffects::Allocate>(it.getEffect()) && it.getValue() && in wouldOpBeTriviallyDeadImpl() 125 template bool mlir::hasSingleEffect<MemoryEffects::Allocate>(Operation *,
|
| /llvm-project-15.0.7/compiler-rt/lib/asan/tests/ |
| H A D | asan_fake_stack_test.cpp | 105 TEST(FakeStack, Allocate) { in TEST() argument 115 FakeFrame *ff = fs->Allocate(stack_size_log, cid, 0); in TEST() 124 EXPECT_EQ(0UL, fs->Allocate(stack_size_log, cid, 0)); in TEST() 136 FakeFrame *ff = fs->Allocate(fs->stack_size_log(), class_id, 0); in RecursiveFunction()
|
| /llvm-project-15.0.7/compiler-rt/test/hwasan/TestCases/ |
| H A D | thread-uaf.c | 15 void *Allocate(void *arg) { in Allocate() function 50 pthread_create(&t1, NULL, Allocate, NULL); in main()
|