Home
last modified time | relevance | path

Searched full:allocator (Results 1 – 25 of 1228) sorted by relevance

12345678910>>...50

/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_allocator_local_cache.h9 // Part of the Sanitizer Allocator.
19 typedef SizeClassAllocator Allocator; typedef
20 typedef MemoryMapper<Allocator> MemoryMapperT;
28 void Destroy(SizeClassAllocator *allocator, AllocatorGlobalStats *s) { in Destroy()
29 Drain(allocator); in Destroy()
34 void *Allocate(SizeClassAllocator *allocator, uptr class_id) { in Allocate()
39 if (UNLIKELY(!Refill(c, allocator, class_id))) in Allocate()
45 return reinterpret_cast<void *>(allocator->CompactPtrToPointer( in Allocate()
46 allocator->GetRegionBeginBySizeClass(class_id), chunk)); in Allocate()
49 void Deallocate(SizeClassAllocator *allocator, uptr class_id, void *p) { in Deallocate()
[all …]
/src/share/doc/papers/kernmalloc/
H A Dkernmalloc.t74 Design of a General Purpose Memory Allocator for the 4.3BSD UNIX\(dg Kernel
96 This paper describes a general purpose dynamic memory allocator
98 The design of this allocator takes advantage of known memory usage
101 This allocator replaces the multiple memory allocation interfaces
108 the new memory allocator,
138 of an older allocator.
145 To reduce the overhead, a ``new'' memory allocator was built in 4.3BSD
151 First, the new allocator can only handle a limited range of sizes.
157 A generalized memory allocator is needed to reduce the complexity
160 the kernel should provide a single general purpose allocator.
[all …]
/src/contrib/llvm-project/compiler-rt/lib/scudo/standalone/
H A Dtsd_exclusive.h27 template <class Allocator> void teardownThread(void *Ptr);
29 template <class Allocator> struct TSDRegistryExT {
30 using ThisT = TSDRegistryExT<Allocator>;
43 TSD<Allocator> &operator*() { return *CurrentTSD; }
45 TSD<Allocator> *operator->() {
51 TSD<Allocator> *CurrentTSD;
55 void init(Allocator *Instance) REQUIRES(Mutex) { in init()
58 CHECK_EQ(pthread_key_create(&PThreadKey, teardownThread<Allocator>), 0); in init()
63 void initOnceMaybe(Allocator *Instance) EXCLUDES(Mutex) { in initOnceMaybe()
70 void unmapTestOnly(Allocator *Instance) EXCLUDES(Mutex) { in unmapTestOnly()
[all …]
H A Dwrappers_cpp.cpp39 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
44 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]()
50 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new()
56 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]()
61 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
67 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator new[]()
74 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New, in operator new()
81 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator new[]()
89 Allocator.deallocate(ptr, scudo::Chunk::Origin::New); in operator delete()
93 Allocator.deallocate(ptr, scudo::Chunk::Origin::NewArray); in operator delete[]()
[all …]
H A Dtsd_shared.h27 template <class Allocator, u32 TSDsArraySize, u32 DefaultTSDCount>
29 using ThisT = TSDRegistrySharedT<Allocator, TSDsArraySize, DefaultTSDCount>;
39 TSD<Allocator> &operator*() { return *CurrentTSD; }
41 TSD<Allocator> *operator->() {
47 TSD<Allocator> *CurrentTSD;
50 void init(Allocator *Instance) REQUIRES(Mutex) { in init()
61 void initOnceMaybe(Allocator *Instance) EXCLUDES(Mutex) { in initOnceMaybe()
68 void unmapTestOnly(Allocator *Instance) EXCLUDES(Mutex) { in unmapTestOnly()
78 void drainCaches(Allocator *Instance) { in drainCaches()
87 ALWAYS_INLINE void initThreadMaybe(Allocator *Instance, in initThreadMaybe()
[all …]
H A Dwrappers_c_bionic.cpp26 #define SCUDO_ALLOCATOR Allocator
30 static scudo::Allocator<scudo::Config, SCUDO_PREFIX(malloc_postinit)>
39 INTERFACE void __scudo_print_stats(void) { Allocator.printStats(); } in __scudo_print_stats()
46 Allocator.getErrorInfo(error_info, fault_addr, stack_depot, stack_depot_size, in __scudo_get_error_info()
52 return Allocator.getStackDepotAddress(); in __scudo_get_stack_depot_addr()
56 return Allocator.getStackDepotSize(); in __scudo_get_stack_depot_size()
60 return Allocator.getRegionInfoArrayAddress(); in __scudo_get_region_info_addr()
64 return Allocator.getRegionInfoArraySize(); in __scudo_get_region_info_size()
68 return Allocator.getRingBufferAddress(); in __scudo_get_ring_buffer_addr()
72 return Allocator.getRingBufferSize(); in __scudo_get_ring_buffer_size()
/src/contrib/llvm-project/libcxx/include/
H A Dset21 class Allocator = allocator<Key>>
30 typedef Allocator allocator_type;
60 …set(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator()); // C++…
76 set(from_range_t, R&& rg, const Allocator& a))
138 void merge(set<Key, C2, Allocator>& source); // C++17
140 void merge(set<Key, C2, Allocator>&& source); // C++17
142 void merge(multiset<Key, C2, Allocator>& source); // C++17
144 void merge(multiset<Key, C2, Allocator>&& source); // C++17
195 class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
197 Compare = Compare(), Allocator = Allocator())
[all …]
H A Dmap21 class Allocator = allocator<pair<const Key, T>>>
30 typedef Allocator allocator_type;
74 …map(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator()); // C++…
89 map(from_range_t, R&& rg, const Allocator& a))
179 void merge(map<Key, T, C2, Allocator>& source); // C++17
181 void merge(map<Key, T, C2, Allocator>&& source); // C++17
183 void merge(multimap<Key, T, C2, Allocator>& source); // C++17
185 void merge(multimap<Key, T, C2, Allocator>&& source); // C++17
235 class Allocator = allocator<iter_to_alloc_t<InputIterator>>>
236 map(InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator())
[all …]
H A Dunordered_set25 class Alloc = allocator<Value>>
69 unordered_set(const unordered_set&, const Allocator&);
75 unordered_set(unordered_set&&, const Allocator&);
144 void merge(unordered_set<Key, H2, P2, Allocator>& source); // C++17
146 void merge(unordered_set<Key, H2, P2, Allocator>&& source); // C++17
148 void merge(unordered_multiset<Key, H2, P2, Allocator>& source); // C++17
150 void merge(unordered_multiset<Key, H2, P2, Allocator>&& source); // C++17
153 noexcept(allocator_traits<Allocator>::is_always_equal::value &&
202 class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
204 Hash = Hash(), Pred = Pred(), Allocator = Allocator())
[all …]
H A Diosfwd26 template<class T> class allocator;
35 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
37 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
39 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
41 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
92 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
98 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
145 template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
153 template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
/src/contrib/xz/src/liblzma/simple/
H A Dsimple_coder.h19 const lzma_allocator *allocator,
23 const lzma_allocator *allocator,
28 const lzma_allocator *allocator,
32 const lzma_allocator *allocator,
37 const lzma_allocator *allocator,
41 const lzma_allocator *allocator,
46 const lzma_allocator *allocator,
50 const lzma_allocator *allocator,
55 const lzma_allocator *allocator,
59 const lzma_allocator *allocator,
[all …]
/src/contrib/llvm-project/libcxx/include/__memory/
H A Dallocator.h33 class allocator; variable
37 // Specializing allocator<void> is deprecated, but not using it.
39 class _LIBCPP_TEMPLATE_VIS allocator<void> {
47 typedef allocator<_Up> other;
54 class _LIBCPP_TEMPLATE_VIS allocator<const void> {
62 typedef allocator<_Up> other;
88 // allocator
91 // allocator<void> trivial in C++20.
94 class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::value, allocator<_Tp…
95 static_assert(!is_const<_Tp>::value, "std::allocator does not support const types");
[all …]
/src/contrib/xz/src/liblzma/common/
H A Dstream_encoder.c61 block_encoder_init(lzma_stream_coder *coder, const lzma_allocator *allocator) in block_encoder_init() argument
74 return lzma_block_encoder_init(&coder->block_encoder, allocator, in block_encoder_init()
80 stream_encode(void *coder_ptr, const lzma_allocator *allocator, in stream_encode() argument
122 &coder->index_encoder, allocator, in stream_encode()
132 return_if_error(block_encoder_init(coder, allocator)); in stream_encode()
159 coder->block_encoder.coder, allocator, in stream_encode()
169 return_if_error(lzma_index_append(coder->index, allocator, in stream_encode()
181 coder->index_encoder.coder, allocator, in stream_encode()
213 stream_encoder_end(void *coder_ptr, const lzma_allocator *allocator) in stream_encoder_end() argument
217 lzma_next_end(&coder->block_encoder, allocator); in stream_encoder_end()
[all …]
H A Doutqueue.c42 move_head_to_cache(lzma_outq *outq, const lzma_allocator *allocator) in move_head_to_cache() argument
54 lzma_outq_clear_cache(outq, allocator); in move_head_to_cache()
67 free_one_cached_buffer(lzma_outq *outq, const lzma_allocator *allocator) in free_one_cached_buffer() argument
77 lzma_free(buf, allocator); in free_one_cached_buffer()
83 lzma_outq_clear_cache(lzma_outq *outq, const lzma_allocator *allocator) in lzma_outq_clear_cache() argument
86 free_one_cached_buffer(outq, allocator); in lzma_outq_clear_cache()
93 lzma_outq_clear_cache2(lzma_outq *outq, const lzma_allocator *allocator, in lzma_outq_clear_cache2() argument
101 free_one_cached_buffer(outq, allocator); in lzma_outq_clear_cache2()
105 free_one_cached_buffer(outq, allocator); in lzma_outq_clear_cache2()
112 lzma_outq_init(lzma_outq *outq, const lzma_allocator *allocator, in lzma_outq_init() argument
[all …]
H A Dcommon.c39 lzma_alloc(size_t size, const lzma_allocator *allocator) in lzma_alloc() argument
47 if (allocator != NULL && allocator->alloc != NULL) in lzma_alloc()
48 ptr = allocator->alloc(allocator->opaque, 1, size); in lzma_alloc()
58 lzma_alloc_zero(size_t size, const lzma_allocator *allocator) in lzma_alloc_zero() argument
66 if (allocator != NULL && allocator->alloc != NULL) { in lzma_alloc_zero()
67 ptr = allocator->alloc(allocator->opaque, 1, size); in lzma_alloc_zero()
79 lzma_free(void *ptr, const lzma_allocator *allocator) in lzma_free() argument
81 if (allocator != NULL && allocator->free != NULL) in lzma_free()
82 allocator->free(allocator->opaque, ptr); in lzma_free()
123 lzma_next_filter_init(lzma_next_coder *next, const lzma_allocator *allocator, in lzma_next_filter_init() argument
[all …]
/src/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_allocator.cpp11 // HWAddressSanitizer allocator.
28 static Allocator allocator; variable
37 // Either just allocated by underlying allocator, but AsanChunk is not yet
38 // ready, or almost returned to undelying allocator and AsanChunk is already
72 return allocator.GetActuallyAllocatedSize(reinterpret_cast<void *>(block_)); in ActualSize()
76 return allocator.FromPrimary(reinterpret_cast<void *>(block_)); in FromSmallHeap()
120 allocator.GetStats(s); in GetAllocatorStats()
152 allocator.InitLinkerInitialized( in HwasanAllocatorInit()
165 void HwasanAllocatorLock() { allocator.ForceLock(); } in HwasanAllocatorLock()
167 void HwasanAllocatorUnlock() { allocator.ForceUnlock(); } in HwasanAllocatorUnlock()
[all …]
/src/contrib/llvm-project/compiler-rt/lib/msan/
H A Dmsan_allocator.cpp11 // MemorySanitizer allocator.
51 // Note: to ensure that the allocator is compatible with the application memory
53 // duplicated as MappingDesc::ALLOCATOR in msan.h.
146 typedef CombinedAllocator<PrimaryAllocator> Allocator; typedef
147 typedef Allocator::AllocatorCache AllocatorCache;
149 static Allocator allocator; variable
157 allocator.Init(common_flags()->allocator_release_to_os_interval_ms); in MsanAllocatorInit()
165 void LockAllocator() { allocator.ForceLock(); } in LockAllocator()
167 void UnlockAllocator() { allocator.ForceUnlock(); } in UnlockAllocator()
176 allocator.InitCache(GetAllocatorCache(this)); in Init()
[all …]
/src/contrib/llvm-project/compiler-rt/lib/dfsan/
H A Ddfsan_allocator.cpp11 // DataflowSanitizer allocator.
40 // Note: to ensure that the allocator is compatible with the application memory
42 // duplicated as MappingDesc::ALLOCATOR in dfsan_platform.h.
62 typedef CombinedAllocator<PrimaryAllocator> Allocator; typedef
63 typedef Allocator::AllocatorCache AllocatorCache;
65 static Allocator allocator; variable
73 allocator.Init(common_flags()->allocator_release_to_os_interval_ms); in dfsan_allocator_init()
88 allocator.SwallowCache(GetAllocatorCache(this)); in CommitBack()
111 allocated = allocator.Allocate(cache, size, alignment); in DFsanAllocate()
115 allocated = allocator.Allocate(cache, size, alignment); in DFsanAllocate()
[all …]
/src/contrib/llvm-project/llvm/lib/DWARFLinker/Parallel/
H A DDIEGenerator.h24 DIEGenerator(BumpPtrAllocator &Allocator, DwarfUnit &CU) in DIEGenerator() argument
25 : Allocator(Allocator), CU(CU) {} in DIEGenerator()
27 DIEGenerator(DIE *OutputDIE, BumpPtrAllocator &Allocator, DwarfUnit &CU) in DIEGenerator() argument
28 : Allocator(Allocator), CU(CU), OutputDIE(OutputDIE) {} in DIEGenerator()
32 OutputDIE = DIE::get(Allocator, DieTag); in createDIE()
60 DIELoc *Loc = new (Allocator) DIELoc; in addLocationAttribute()
63 Allocator, static_cast<dwarf::Attribute>(0), dwarf::DW_FORM_data1, in addLocationAttribute()
82 DIEBlock *Block = new (Allocator) DIEBlock; in addBlockAttribute()
85 Allocator, static_cast<dwarf::Attribute>(0), dwarf::DW_FORM_data1, in addBlockAttribute()
118 DIEBlock *Block = new (Allocator) DIEBlock; in addInplaceString()
[all …]
H A DTypePool.h16 #include "llvm/Support/Allocator.h"
46 create(llvm::parallel::PerThreadBumpPtrAllocator &Allocator) { in create() argument
47 TypeEntryBody *Result = Allocator.Allocate<TypeEntryBody>(); in create()
48 new (Result) TypeEntryBody(Allocator); in create()
77 TypeEntryBody(llvm::parallel::PerThreadBumpPtrAllocator &Allocator) in TypeEntryBody() argument
78 : Children(&Allocator) {} in TypeEntryBody()
101 llvm::parallel::PerThreadBumpPtrAllocator &Allocator) { in create() argument
102 return TypeEntry::create(Key, Allocator); in create()
116 TypeEntryInfo>(Allocator) { in TypePool()
117 Root = TypeEntry::create("", Allocator); in TypePool()
[all …]
/src/contrib/llvm-project/llvm/include/llvm/Support/
H A DRecyclingAllocator.h1 //==- llvm/Support/RecyclingAllocator.h - Recycling Allocator ----*- C++ -*-==//
21 /// RecyclingAllocator - This class wraps an Allocator, adding the
32 /// Allocator - The wrapped allocator.
34 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
[all …]
H A DAllocator.h1 //===- Allocator.h - Simple memory allocation abstraction -------*- C++ -*-===//
11 /// to the LLVM "Allocator" concept and is similar to MallocAllocator, but
13 /// allocator.
38 // printing code uses Allocator.h in its implementation.
46 /// This isn't strictly a bump-pointer allocator as it uses backing slabs of
57 /// use a custom allocator.
59 /// The GrowthDelay specifies after how many allocated slabs the allocator
81 BumpPtrAllocatorImpl(T &&Allocator) in BumpPtrAllocatorImpl() argument
82 : AllocTy(std::forward<T &&>(Allocator)) {} in BumpPtrAllocatorImpl()
84 // Manually implement a move constructor as we must clear the old allocator's
[all …]
/src/contrib/llvm-project/llvm/include/llvm/DebugInfo/MSF/
H A DMappedBlockStream.h15 #include "llvm/Support/Allocator.h"
43 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);
94 // We just store the allocator by reference. We use this to allocate
100 // allocator to allocate broken records from.
101 BumpPtrAllocator &Allocator; variable
[all …]
/src/lib/libmemstat/
H A Dlibmemstat.330 .Nd "library interface to retrieve kernel memory allocator statistics"
48 .Fa "struct memory_type_list *list" "int allocator" "const char *name"
54 .Ss Allocator Query Functions
144 provides an interface to retrieve kernel memory allocator statistics, for
203 holds a description of the memory type, including its name and the allocator
241 .Ss Allocator Types
256 Two additional constants in the allocator name space are defined:
260 which can be used to specify that returning types matching any allocator is
273 Note that names will be unique with respect to a single allocator, but that
277 Return an integer identifier for the memory allocator that owns the memory
[all …]
/src/contrib/llvm-project/compiler-rt/lib/xray/
H A Dxray_allocator.h11 // Defines the allocator interface for an arena allocator, used primarily for
37 // internal allocator. This allows us to manage the memory directly, using
147 /// The Allocator type hands out fixed-sized chunks of memory that are
150 /// allocator also self-limits the peak memory usage to a dynamically defined
158 /// The Allocator instance will manage its own memory acquired through mmap.
164 template <size_t N> struct Allocator { struct
165 // The Allocator returns memory as Block instances.
186 Report("XRay Profiling: Failed to allocate memory for allocator\n"); in Alloc()
225 explicit Allocator(size_t M) XRAY_NEVER_INSTRUMENT in Allocator() argument
233 explicit Allocator(void *P, size_t M) XRAY_NEVER_INSTRUMENT in Allocator() function
[all …]

12345678910>>...50