| /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_allocator_local_cache.h | 9 // 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 …]
|
| /freebsd/share/doc/papers/kernmalloc/ |
| H A D | kernmalloc.t | 74 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 …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
| H A D | tsd_exclusive.h | 27 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 D | wrappers_cpp.cpp | 39 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); 61 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New, in operator delete[]() 67 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator delete[]() 74 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New, in operator delete[]() 81 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray, in operator delete() 89 Allocator.deallocate(ptr, scudo::Chunk::Origin::New); in operator delete() 93 Allocator in operator delete[]() [all...] |
| H A D | tsd_shared.h | 27 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 D | wrappers_c_bionic.cpp | 26 #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()
|
| /freebsd/contrib/llvm-project/libcxx/include/ |
| H A D | set | 21 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 D | map | 21 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 D | unordered_set | 25 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 D | iosfwd | 26 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>>
|
| H A D | syncstream | 19 template<class charT, class traits, class Allocator> 23 template<class charT, class traits, class Allocator> 24 void swap(basic_syncbuf<charT, traits, Allocator>&, 25 basic_syncbuf<charT, traits, Allocator>&); 30 template<class charT, class traits, class Allocator> 36 template<class charT, class traits, class Allocator> 44 using allocator_type = Allocator; 50 : basic_syncbuf(obuf, Allocator()) {} 51 basic_syncbuf(streambuf_type*, const Allocator&); 75 template<class charT, class traits, class Allocator> [all …]
|
| /freebsd/contrib/llvm-project/libcxx/include/__memory/ |
| H A D | allocator.h | 33 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 …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/ |
| H A D | hwasan_allocator.cpp | 11 // 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 …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/msan/ |
| H A D | msan_allocator.cpp | 11 // 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 …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/ |
| H A D | dfsan_allocator.cpp | 11 // 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 …]
|
| /freebsd/contrib/xz/src/liblzma/common/ |
| H A D | common.c | 39 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 …]
|
| H A D | stream_encoder_mt.c | 70 /// The allocator is set by the main thread. Since a copy of the 72 /// allocator before calling lzma_end(). 73 const lzma_allocator *allocator; member 245 thr->allocator, &thr->block_options); in worker_encode() 295 thr->block_encoder.coder, thr->allocator, in worker_encode() 432 lzma_filters_free(thr->filters, thr->allocator); in worker_start() 437 lzma_next_end(&thr->block_encoder, thr->allocator); in worker_start() 438 lzma_free(thr->in, thr->allocator); in worker_start() 474 threads_end(lzma_stream_coder *coder, const lzma_allocator *allocator) in threads_end() argument 489 lzma_free(coder->threads, allocator); in threads_end() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
| H A D | RecyclingAllocator.h | 1 //==- 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 D | Allocator.h | 1 //===- 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 …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/DebugInfo/MSF/ |
| H A D | MappedBlockStream.h | 15 #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...] |
| /freebsd/lib/libmemstat/ |
| H A D | libmemstat.3 | 30 .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 …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/xray/ |
| H A D | xray_allocator.h | 11 // 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() function 233 explicit Allocator(void *P, size_t M) XRAY_NEVER_INSTRUMENT in Allocator() function [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/lsan/ |
| H A D | lsan_allocator.cpp | 37 static Allocator allocator; variable 43 allocator.InitLinkerInitialized( in InitializeAllocator() 52 void AllocatorThreadStart() { allocator.InitCache(GetAllocatorCache()); } in AllocatorThreadStart() 55 allocator.SwallowCache(GetAllocatorCache()); in AllocatorThreadFinish() 56 allocator.DestroyCache(GetAllocatorCache()); in AllocatorThreadFinish() 60 return reinterpret_cast<ChunkMetadata *>(allocator.GetMetaData(p)); in Metadata() 101 void *p = allocator.Allocate(GetAllocatorCache(), size, alignment); in Allocate() 108 // Do not rely on the allocator to clear the memory (it's slow). in Allocate() 109 if (cleared && allocator.FromPrimary(p)) in Allocate() 127 allocator.Deallocate(GetAllocatorCache(), p); in Deallocate() [all …]
|
| /freebsd/sys/contrib/ck/src/ |
| H A D | ck_array.c | 35 ck_array_create(struct ck_malloc *allocator, unsigned int length) in ck_array_create() argument 39 active = allocator->malloc(sizeof(struct _ck_array) + sizeof(void *) * length); in ck_array_create() 50 ck_array_init(struct ck_array *array, unsigned int mode, struct ck_malloc *allocator, unsigned int … in ck_array_init() argument 56 if (allocator->realloc == NULL || in ck_array_init() 57 allocator->malloc == NULL || in ck_array_init() 58 allocator->free == NULL || in ck_array_init() 62 active = ck_array_create(allocator, length); in ck_array_init() 67 array->allocator = allocator; in ck_array_init() 89 target = array->allocator->realloc(target, in ck_array_put() 112 target = array->allocator->realloc(target, in ck_array_put() [all …]
|
| /freebsd/contrib/xz/src/liblzma/lz/ |
| H A D | lz_encoder.c | 80 fill_window(lzma_coder *coder, const lzma_allocator *allocator, in fill_window() argument 104 ret = coder->next.code(coder->next.coder, allocator, in fill_window() 159 lz_encode(void *coder_ptr, const lzma_allocator *allocator, in lz_encode() argument 172 return_if_error(fill_window(coder, allocator, in lz_encode() 192 lz_encoder_prepare(lzma_mf *mf, const lzma_allocator *allocator, in lz_encoder_prepare() argument 231 lzma_free(mf->buffer, allocator); in lz_encoder_prepare() 351 lzma_free(mf->hash, allocator); in lz_encoder_prepare() 354 lzma_free(mf->son, allocator); in lz_encoder_prepare() 372 lz_encoder_init(lzma_mf *mf, const lzma_allocator *allocator, in lz_encoder_init() argument 381 allocator); in lz_encoder_init() [all …]
|