| /arkcompiler/runtime_core/libpandabase/os/ |
| D | mem.h | 35 #include <memory> 44 * \brief Make memory region \param mem with size \param size with protection flags \param prot 45 * @param mem Pointer to memory region (should be aligned to page size) 46 * @param size Size of memory region 47 * @param prot Memory protection flags, a combination of MMAP_PROT_XXX values 53 * \brief Make memory region \param mem with size \param size readable and executable 54 * @param mem Pointer to memory region (should be aligned to page size) 55 * @param size Size of memory region 61 * \brief Make memory region \param mem with size \param size readable and writable 62 * @param mem Pointer to memory region (should be aligned to page size) [all …]
|
| /arkcompiler/runtime_core/runtime/ |
| D | locks.cpp | 20 #include <memory> 27 os::memory::Mutex *Locks::custom_tls_lock = nullptr; 28 os::memory::Mutex *Locks::user_suspension_lock = nullptr; 34 Locks::custom_tls_lock = new os::memory::Mutex(); in Initialize() 35 Locks::user_suspension_lock = new os::memory::Mutex(); in Initialize() 45 os::memory::RWLock::ReadLock(); in ReadLock() 53 os::memory::RWLock::WriteLock(); in WriteLock() 60 bool ret = os::memory::RWLock::TryReadLock(); in TryReadLock() 70 bool ret = os::memory::RWLock::TryWriteLock(); in TryWriteLock() 81 os::memory::RWLock::Unlock(); in Unlock()
|
| D | thread_pool.h | 91 os::memory::LockHolder lock(scale_lock_); in ~ThreadPool() 98 os::memory::LockHolder scale_lock(scale_lock_); in Scale() 110 os::memory::LockHolder queue_lock(queue_lock_); in Scale() 125 os::memory::LockHolder queue_lock(queue_lock_); in Scale() 138 os::memory::LockHolder scale_lock(scale_lock_); in Help() 154 os::memory::LockHolder lock(queue_lock_); in Help() 176 os::memory::LockHolder lock(queue_lock_); in TryPutTask() 192 os::memory::LockHolder lock(queue_lock_); in PutTask() 207 os::memory::LockHolder lock(queue_lock_); in IsActive() 213 os::memory::LockHolder lock(scale_lock_); [all …]
|
| D | class_linker_context.h | 38 os::memory::LockHolder lock(classes_lock_); in FindClass() 65 os::memory::LockHolder lock(classes_lock_); in InsertClass() 78 os::memory::LockHolder lock(classes_lock_); in RemoveClass() 85 os::memory::LockHolder lock(classes_lock_); in EnumerateClasses() 98 os::memory::LockHolder lock(classes_lock_); in NumLoadedClasses() 104 os::memory::LockHolder lock(classes_lock_); in VisitLoadedClasses() 120 os::memory::LockHolder lock(classes_lock_); in AddGCRoot() 165 os::memory::RecursiveMutex classes_lock_;
|
| D | string_table.cpp | 85 os::memory::ReadLockHolder holder(table_lock_); in VisitStrings() 95 os::memory::ReadLockHolder holder(table_lock_); in GetString() 109 os::memory::ReadLockHolder holder(table_lock_); in GetString() 122 os::memory::ReadLockHolder holder(table_lock_); in GetString() 135 os::memory::WriteLockHolder holder(table_lock_); in ForceInternString() 144 os::memory::WriteLockHolder holder(table_lock_); in InternString() 206 os::memory::WriteLockHolder holder(table_lock_); in UpdateMoved() 227 os::memory::WriteLockHolder holder(table_lock_); in Sweep() 252 os::memory::ReadLockHolder holder(table_lock_); in Size() 307 os::memory::WriteLockHolder lock(maps_lock_); in GetOrInternString() [all …]
|
| /arkcompiler/runtime_core/runtime/arch/ |
| D | memory_helpers.h | 19 #include "aarch64/memory.h" 21 #include "arm/memory.h" 23 #include "x86/memory.h" 25 #include "amd64/memory.h" 32 // Forces system-wide full memory synchronization 34 // Architecture-agnostic C++ memory order provides no reordering guarantees in case just one thread…
|
| /arkcompiler/runtime_core/runtime/mem/ |
| D | heap_space.cpp | 91 os::memory::WriteLockHolder lock(heap_lock_); in ComputeNewSize() 116 // If can allocate pool (from free pool map or non-used memory) then just do it in WillAlloc() 118 // We have enough memory for allocation, no need to increase heap in WillAlloc() 123 …// if requested pool size greater free bytes in current heap space and non occupied memory then we… in WillAlloc() 157 os::memory::WriteLockHolder lock(heap_lock_); in TryAllocPool() 179 os::memory::WriteLockHolder lock(heap_lock_); in TryAllocArena() 185 os::memory::ReadLockHolder lock(heap_lock_); in FreePool() 193 os::memory::ReadLockHolder lock(heap_lock_); in FreeArena() 225 os::memory::ReadLockHolder lock(heap_lock_); in GetCurrentFreeYoungSize() 231 os::memory::ReadLockHolder lock(heap_lock_); in GetCurrentFreeTenuredSize() [all …]
|
| D | alloc_config.h | 29 … stats about allocations and free events. Allocators don't care about the type of allocated memory. 30 …* It could be raw memory for any reason or memory for object in the programming language. If it's … 50 * \brief Initialize an object memory allocated by an allocator. 59 // without 'volatile' specifier so full memory barrier is required in MemoryInit() 104 * \brief Initialize a Crossing map for the corresponding memory ranges. 114 * \brief Remove a Crossing map for the corresponding memory ranges. 125 * @param mem_range - range of a new young memory. 149 * \brief Initialize an object memory allocated by an allocator. 158 // without 'volatile' specifier so full memory barrier is required in MemoryInit() 190 * @param mem_range - range of a new young memory. [all …]
|
| D | humongous_obj_allocator-inl.h | 47 os::memory::WriteLockHolder<LockConfigT, need_lock> wlock(alloc_free_lock_); in Alloc() 48 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Try to allocate memory with size " << size; in Alloc() 50 // Check that we can get a memory header for the memory pointer by using PAGE_SIZE_MASK mask in Alloc() 73 …LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Find reserved memory block with size " << mem_header->GetPo… in Alloc() 80 …LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Find free memory block with size " << mem_header->GetPoolSi… in Alloc() 85 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Can't find memory for this size"; in Alloc() 90 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Allocated memory at addr " << std::hex << mem; in Alloc() 101 os::memory::WriteLockHolder wlock(alloc_free_lock_); in Free() 109 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Try to free memory at invalid addr 0"; in FreeUnsafe() 112 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Try to free memory at addr " << std::hex << mem; in FreeUnsafe() [all …]
|
| D | freelist_allocator-inl.h | 49 os::memory::WriteLockHolder<LockConfigT, need_lock> wlock(alloc_free_lock_); in Alloc() 62 …LOG_FREELIST_ALLOCATOR(DEBUG) << "Try allocate too big memory for free list allocator. Return null… in Alloc() 65 // Get best-fit memory piece from segregated list. in Alloc() 68 LOG_FREELIST_ALLOCATOR(DEBUG) << "Couldn't allocate memory"; in Alloc() 71 …LOG_FREELIST_ALLOCATOR(DEBUG) << "Found memory block at addr = " << std::hex << memory_block << " … in Alloc() 77 …LOG_FREELIST_ALLOCATOR(DEBUG) << "Raw memory is not aligned as we need. Create special header for … in Alloc() 78 // Raw memory pointer is not aligned as we expected in Alloc() 95 LOG_FREELIST_ALLOCATOR(DEBUG) << "Created new memory block from the remainder part:"; in Alloc() 119 …LOG_FREELIST_ALLOCATOR(DEBUG) << "Allocated memory at addr " << std::hex << ToVoidPtr(memory_point… in Alloc() 136 os::memory::WriteLockHolder wlock(alloc_free_lock_); in Free() [all …]
|
| D | bump-allocator.h | 19 #include <memory> 37 using CommonLock = os::memory::Mutex; 38 using DummyLock = os::memory::DummyLock; 44 // This allocator can allocate memory as a BumpPointerAllocator 45 // and also can allocate big pieces of memory for the TLABs. 50 // | Memory Pool … 52 // | allocated objects | unused memory | memory for TLABs … 56 // |xxxxxxxxxx|xxxxxx|xxxxxxxxx| free memory | TLAB 3 || TLAB 2 || … 109 * \brief Add an extra memory pool to the allocator. 110 * The memory pool must be located just after the current memory given to this allocator. [all …]
|
| D | bump-allocator-inl.h | 68 …LOG_BUMP_ALLOCATOR(DEBUG) << "Expand memory: Add " << std::dec << size << " bytes of memory at add… in ExpandMemory() 81 os::memory::LockHolder lock(allocator_lock_); in Alloc() 82 LOG_BUMP_ALLOCATOR(DEBUG) << "Try to allocate " << std::dec << size << " bytes of memory"; in Alloc() 84 // We need to align up it here to write correct used memory size inside MemStats. in Alloc() 94 // We must take TLABs occupied memory into account. in Alloc() 101 LOG_BUMP_ALLOCATOR(DEBUG) << "Couldn't allocate memory"; in Alloc() 113 os::memory::LockHolder lock(allocator_lock_); in CreateNewTLAB() 138 …LOG_BUMP_ALLOCATOR(DEBUG) << "Don't have enough memory for new TLAB with size " << std::dec << siz… in CreateNewTLAB() 146 os::memory::LockHolder lock(allocator_lock_); in VisitAndRemoveAllPools() 155 os::memory::LockHolder lock(allocator_lock_); in VisitAndRemoveFreePools() [all …]
|
| D | freelist_allocator.h | 43 using CommonLock = os::memory::RWLock; 44 using DummyLock = os::memory::DummyLock; 60 // |..Memory..|xOCCUPIEDx|..Memory..|...on...|00FREE00|..Memory..|xOCCUPIEDx|..Memory..|...on..… 69 // |..Memory..||.Padding..||xxxxxxxxxxOCCUPIEDxxxxxxxxxxxxx| 77 // |..Memory..|.Padding|--------|.Padding..||xxxxxxxxxxOCCUPIEDxxxxxxxxxxxxx| 119 * \brief Iterates over all memory pools used by this allocator 130 * \brief Visit memory pools that can be returned to the system in this allocator 260 // If it is off, we insert memory in the list in the descending order. 282 // Each element of this array consists of memory blocks with size 295 // Try to coalesce a memory block with the next and previous blocks. [all …]
|
| D | runslots_allocator-inl.h | 50 …LOG_RUNSLOTS_ALLOCATOR(DEBUG) << "Try to allocate " << size << " bytes of memory with align " << a… in Alloc() 55 // TODO(aemelenko): Do smth more memory flexible with alignment in Alloc() 72 os::memory::LockHolder<ListLock, need_lock> list_lock(*runslots_[array_index].GetLock()); in Alloc() 82 os::memory::LockHolder<ListLock, need_lock> list_lock(*free_runslots_.GetLock()); in Alloc() 90 << "Failed to get new RunSlots from free list, try to allocate one from memory"; in Alloc() 100 …os::memory::LockHolder<typename LockConfigT::RunSlotsLock, need_lock> runslots_lock(*runslots->Get… in Alloc() 113 … LOG_RUNSLOTS_ALLOCATOR(DEBUG) << "Allocate a memory at address " << std::hex << allocated_mem; in Alloc() 115 … os::memory::LockHolder<ListLock, need_lock> list_lock(*runslots_[array_index].GetLock()); in Alloc() 138 os::memory::LockHolder list_lock(*free_runslots_.GetLock()); in ReleaseEmptyRunSlotsPagesUnsafe() 145 os::memory::LockHolder list_lock(*free_runslots_.GetLock()); in ReleaseEmptyRunSlotsPagesUnsafe() [all …]
|
| D | freelist.h | 39 // Is this memory block used somewhere or not (i.e. it is free) 67 // Is this memory block the last in the memory pool 68 // (i.e. we can't compute next memory block via size) 88 // Is this memory block has some padding for alignment. 110 …// Is this memory block has some padding for alignment and we can get correct object memory addres… 156 …// Is this memory block has some padding for alignment and we have padding header just after this … 157 // So, to compute object memory address we need to add padding header size. 224 // We can't have 2 free consistent memory blocks in GetPrevUsedHeader() 239 // We can't have 2 free consistent memory blocks in GetNextUsedHeader() 306 // A special padding header, which is used to find the common header of this memory. [all …]
|
| /arkcompiler/runtime_core/libpandabase/mem/ |
| D | arena.h | 36 * \brief Allocates memory with size \param size and aligned with \param alignment 37 * @param size - size of the allocated memory 38 * @param alignment - alignment of the allocated memory 39 * @return pointer to the allocated memory on success, or nullptr on fail 86 * @return A pointer to the raw memory inside arena 110 …* \brief Mark all memory after \param mem as free. Check that \param mem is stored inside this are… 115 * \brief Set occupied memory size to \param new_size. 125 * \brief Expand arena. The new memory must be located just after the current buffer. 134 * \brief Fast allocates memory with size \param size 135 * @param size - size of the allocated memory, must be \param alignment aligned [all …]
|
| D | code_allocator.h | 35 …locates \param size bytes, copies \param codeBuff to allocated memory and make this memory executa… 43 * \brief Allocates \param size bytes of non-protected memory 50 * Make memory \mem_range executable 69 os::memory::RWLock code_range_lock_;
|
| /arkcompiler/runtime_core/docs/ |
| D | memory-management-SW-requirements.md | 3 The main components of Panda memory management: 12 Garbage collector(GC) automatically recycles memory that it can prove will never be used again. 13 GC used to recycle memory allocated as result of application work(objects, compiled code etc). 31 - Internal memory space for non-compiler part of runtime (including GC internals) 48 # 3. KEY FEATURES OF MEMORY MANAGEMENT SYSTEM 72 - Memory management flexible enough to work with multiple languages.
|
| /arkcompiler/runtime_core/scripts/ |
| D | memusage.py | 17 A tool to get memory usage reports 36 """Memory region information: name, size, rss, pss""" 58 """Checks whether memory region is stack""" 64 """Checks whether memory region is heap""" 93 """Represents panda memory regions""" 115 """Gets memory region information by name""" 136 """Parses smaps and returns memory usage report""" 170 """Aggregates memory usage reports""" 189 """Prints memory usage report row""" 195 """Prints memory usage report""" [all …]
|
| /arkcompiler/ets_runtime/ecmascript/mem/ |
| D | mem_map_allocator.h | 37 os::memory::LockHolder lock(lock_); in Finalize() 51 os::memory::LockHolder lock(lock_); in GetMemFromCache() 63 os::memory::LockHolder lock(lock_); in AddMemToCache() 69 os::memory::LockHolder lock(lock_); in SplitMemFromCache() 82 os::memory::LockHolder lock(lock_); in InsertMemMap() 88 os::memory::Mutex lock_; 121 os::memory::LockHolder lock(lock_); in GetMemFromList() 124 LOG_GC(ERROR) << "Freelist pool oom: memory fragment(" << freeListPoolSize_ << ")"; in GetMemFromList() 140 os::memory::LockHolder lock(lock_); in AddMemToList() 146 os::memory::Mutex lock_;
|
| /arkcompiler/runtime_core/runtime/include/ |
| D | loadable_agent.h | 42 LibraryAgent(os::memory::Mutex &mutex, PandaString libraryPath, PandaString loadCallbackName, 52 os::memory::LockHolder<os::memory::Mutex> lock_; 70 static os::memory::Mutex creation_mutex; in LoadInstance() 71 os::memory::LockHolder<os::memory::Mutex> creation_mutex_lock(creation_mutex); in LoadInstance() 87 static os::memory::Mutex uniqueness_mutex; in LoadInstance()
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | waiter_list.h | 25 using Mutex = os::memory::Mutex; 26 using LockHolder = os::memory::LockHolder<Mutex>; 39 os::memory::ConditionVariable cond_; 41 // Managed Arraybuffer or SharedArrayBuffer memory data 47 // the memory address data corresponding to the offset 70 …// When calling addnode If there is no corresponding memory data, add the node corresponding to th…
|
| /arkcompiler/runtime_core/runtime/mem/gc/g1/ |
| D | update_remset_thread.h | 89 … os::memory::Mutex *queue_lock, size_t region_size, bool update_concurrent, 111 os::memory::LockHolder holder(*queue_lock_); in GetQueueSize() 117 os::memory::LockHolder holder(loop_lock); in SetUpdateConcurrent() 125 os::memory::LockHolder holder(loop_lock); in InvalidateRegions() 130 os::memory::LockHolder holder(loop_lock); in InvalidateRegions() 159 os::memory::Mutex *queue_lock_ {nullptr}; 166 os::memory::Mutex loop_lock; 171 os::memory::ConditionVariable thread_cond_var_;
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | memory_coalescing_doc.md | 1 # Memory Coalescing 8 Replacing two memory operations with one generally reduces the number of long latency memory instru… 37 * Separate instructions that will represent coalesced memory accesses from regular accesses. 54 …memory operations in a scope of a basic block. It needs that two consecutive memory operations are… 56 During hoisting and sinking of memory operations we use rules for memory instruction scheduling: do… 58 Memory coalescing was implemented for array accesses. We process instructions of basic block in ord… 69 3) If the instruction is a memory operation – add it as invalid candidate. 239 | `--compiler-memory-coalescing` | Enables optimization | `true` | 240 | `--compiler-memory-coalescing-objects` | Allows coalescing of operations with `ref`s | `true` | 241 | `--compiler-memory-coalescing-aligned` | Coalesces only aligned accesses (starting with even indi…
|
| /arkcompiler/runtime_core/runtime/coretypes/ |
| D | array.cpp | 63 …// Witout full memory barrier it is possible that architectures with weak memory order can try fet… in Create() 81 …// Without full memory barrier it is possible that architectures with weak memory order can try fe… in Create() 100 …// Witout full memory barrier it is possible that architectures with weak memory order can try fet… in Create() 123 …// Witout full memory barrier it is possible that architectures with weak memory order can try fet… in CreateTagged()
|