| /ark/runtime_core/libpandabase/os/ |
| D | mem.h | 35 #include <memory> 44 * \brief Make memory region \param mem with size \param size readable and executable 45 * @param mem Pointer to memory region (should be aligned to page size) 46 * @param size Size of memory region 52 * \brief Make memory region \param mem with size \param size readable and writable 53 * @param mem Pointer to memory region (should be aligned to page size) 54 * @param size Size of memory region 60 * \brief Make memory region \param mem with size \param size readable 61 * @param mem Pointer to memory region (should be aligned to page size) 62 * @param size Size of memory region [all …]
|
| D | mutex.h | 30 namespace panda::os::memory { 44 using Mutex = panda::os::unix::memory::futex::Mutex; 45 using RecursiveMutex = panda::os::unix::memory::futex::RecursiveMutex; 46 using RWLock = panda::os::unix::memory::futex::RWLock; 47 using ConditionVariable = panda::os::unix::memory::futex::ConditionVariable; 49 using Mutex = panda::os::unix::memory::Mutex; 50 using RecursiveMutex = panda::os::unix::memory::RecursiveMutex; 51 using RWLock = panda::os::unix::memory::RWLock; 53 using ConditionVariable = panda::os::unix::memory::ConditionVariable; 121 } // namespace panda::os::memory
|
| /ark/runtime_core/runtime/tooling/ |
| D | pt_hooks_wrapper.h | 77 os::memory::WriteLockHolder wholder(hooks_rwlock_); in SetHooks() 104 os::memory::ReadLockHolder rholder(hooks_rwlock_); in Breakpoint() 116 os::memory::ReadLockHolder rholder(hooks_rwlock_); in LoadModule() 128 os::memory::ReadLockHolder rholder(hooks_rwlock_); in Paused() 141 os::memory::ReadLockHolder rholder(hooks_rwlock_); in Exception() 153 os::memory::ReadLockHolder rholder(hooks_rwlock_); in ExceptionCatch() 165 os::memory::ReadLockHolder rholder(hooks_rwlock_); in PropertyAccess() 178 os::memory::ReadLockHolder rholder(hooks_rwlock_); in PropertyModification() 190 os::memory::ReadLockHolder rholder(hooks_rwlock_); in FramePop() 203 os::memory::ReadLockHolder rholder(hooks_rwlock_); in GarbageCollectionFinish() [all …]
|
| /ark/runtime_core/runtime/ |
| D | locks.cpp | 19 #include <memory> 26 os::memory::Mutex *Locks::custom_tls_lock = nullptr; 27 os::memory::Mutex *Locks::user_suspension_lock = nullptr; 35 Locks::custom_tls_lock = new os::memory::Mutex(); in Initialize() 37 Locks::user_suspension_lock = new os::memory::Mutex(); in Initialize() 48 os::memory::RWLock::ReadLock(); in ReadLock() 56 os::memory::RWLock::WriteLock(); in WriteLock() 63 bool ret = os::memory::RWLock::TryReadLock(); in TryReadLock() 73 bool ret = os::memory::RWLock::TryWriteLock(); in TryWriteLock() 84 os::memory::RWLock::Unlock(); in Unlock()
|
| D | thread_pool.h | 65 os::memory::LockHolder lock(scale_lock_); in ~ThreadPool() 72 os::memory::LockHolder lock(scale_lock_); in Scale() 84 os::memory::LockHolder lock2(queue_lock_); in Scale() 99 os::memory::LockHolder lock2(queue_lock_); in Scale() 111 os::memory::LockHolder lock(queue_lock_); in TryPutTask() 127 os::memory::LockHolder lock(queue_lock_); in PutTask() 142 os::memory::LockHolder lock(queue_lock_); in IsActive() 148 os::memory::LockHolder lock(scale_lock_); 169 os::memory::LockHolder lock(thread_pool->queue_lock_); in WorkerEntry() 202 os::memory::LockHolder lock(queue_lock_); in DeactivateWorkers() [all …]
|
| D | class_linker_context.h | 38 os::memory::LockHolder lock(classes_lock_); in FindClass() 60 os::memory::LockHolder lock(classes_lock_); in InsertClass() 76 os::memory::LockHolder lock(classes_lock_); in RemoveClass() 86 os::memory::LockHolder lock(classes_lock_); 93 os::memory::LockHolder lock(classes_lock_); 109 os::memory::LockHolder lock(classes_lock_); 112 os::memory::LockHolder lock(classes_lock_); 122 os::memory::LockHolder lock(classes_lock_); in NumLoadedClasses() 128 os::memory::LockHolder lock(classes_lock_); in VisitLoadedClasses() 144 os::memory::LockHolder lock(classes_lock_); in AddGCRoot() [all …]
|
| D | string_table.cpp | 82 os::memory::ReadLockHolder holder(table_lock_); in GetString() 96 os::memory::ReadLockHolder holder(table_lock_); in GetString() 109 os::memory::ReadLockHolder holder(table_lock_); in GetString() 122 os::memory::WriteLockHolder holder(table_lock_); in ForceInternString() 129 os::memory::WriteLockHolder holder(table_lock_); in InternString() 186 os::memory::WriteLockHolder holder(table_lock_); in UpdateMoved() 206 os::memory::WriteLockHolder holder(table_lock_); in Sweep() 231 os::memory::ReadLockHolder holder(table_lock_); in Size() 274 os::memory::WriteLockHolder lock(maps_lock_); in GetOrInternString() 288 os::memory::ReadLockHolder lock(maps_lock_); in GetStringFast() [all …]
|
| /ark/runtime_core/runtime/arch/ |
| D | memory_helpers.h | 20 #include "aarch64/memory.h" 22 #include "arm/memory.h" 24 #include "x86/memory.h" 26 #include "amd64/memory.h" 33 // Forces system-wide full memory synchronization 35 // Architecture-agnostic C++ memory order provides no reordering guarantees in case just one thread…
|
| /ark/runtime_core/verification/job_queue/ |
| D | job_queue.cpp | 36 os::memory::ConditionVariable *JobQueue::job_get_cond_var = nullptr; 37 os::memory::ConditionVariable *JobQueue::job_put_cond_var = nullptr; 38 os::memory::ConditionVariable *JobQueue::method_cond_var = nullptr; 40 os::memory::Mutex *JobQueue::queue_lock = nullptr; 41 os::memory::Mutex *JobQueue::method_lock = nullptr; 59 queue_lock = new os::memory::Mutex; in Initialize() 63 method_lock = new os::memory::Mutex; in Initialize() 80 …new (mem::AllocatorAdapter<os::memory::ConditionVariable>().allocate(1)) os::memory::ConditionVari… in Initialize() 83 …new (mem::AllocatorAdapter<os::memory::ConditionVariable>().allocate(1)) os::memory::ConditionVari… in Initialize() 86 …new (mem::AllocatorAdapter<os::memory::ConditionVariable>().allocate(1)) os::memory::ConditionVari… in Initialize() [all …]
|
| D | job_queue.h | 67 panda::os::memory::LockHolder lck {*method_lock}; 86 static panda::os::memory::ConditionVariable *job_get_cond_var; 87 static panda::os::memory::ConditionVariable *job_put_cond_var; 88 static panda::os::memory::ConditionVariable *method_cond_var; 90 static panda::os::memory::Mutex *queue_lock; 91 static panda::os::memory::Mutex *method_lock;
|
| /ark/runtime_core/libpandabase/mem/ |
| D | arena.h | 34 * \brief Allocate memory with size \param size and aligned with \param alignment 35 * @param size - size of the allocated memory 36 * @param alignment - alignment of the allocated memory 37 * @return pointer to the allocated memory on success, or nullptr on fail 84 * @return A pointer to the raw memory inside arena 103 …* \brief Mark all memory after \param mem as free. Check that \param mem is stored inside this are… 108 * \brief Set occupied memory size to \param new_size. 118 * \brief Expand arena. The new memory must be located just after the current buffer. 127 * \brief Fast allocates memory with size \param size 128 * @param size - size of the allocated memory, must be \param alignment aligned [all …]
|
| D | code_allocator.h | 35 …ocates \param size bytes, copies \param codeBuff to allocated memory and makes this memory executa… 43 * \brief Allocates \param size bytes of non-protected memory 50 * Make memory \mem_range executable 68 os::memory::RWLock code_range_lock_;
|
| D | mmap_mem_pool-inl.h | 113 …LOG_MMAP_MEM_POOL(FATAL) << "The memory limits is too high. We can't allocate so much memory from … in MmapMemPool() 125 << "MmapMemPool: couldn't mmap " << object_space_size << " bytes of memory for the system"; in MmapMemPool() 133 … LOG_MMAP_MEM_POOL(DEBUG) << "Successfully initialized MMapMemPool. Object memory start from addr " in MmapMemPool() 158 os::memory::LockHolder lk(lock_); in AllocArenaImpl() 180 os::memory::LockHolder lk(lock_); in FreeArenaImpl() 200 …LOG_MMAP_MEM_POOL(DEBUG) << "Occupied memory for " << SpaceTypeToString(SpaceType::SPACE_TYPE_COMP… in AllocRawMemCompilerImpl() 214 …LOG_MMAP_MEM_POOL(DEBUG) << "Occupied memory for " << SpaceTypeToString(SpaceType::SPACE_TYPE_INTE… in AllocRawMemInternalImpl() 228 …LOG_MMAP_MEM_POOL(DEBUG) << "Occupied memory for " << SpaceTypeToString(SpaceType::SPACE_TYPE_CODE… in AllocRawMemCodeImpl() 236 … LOG_MMAP_MEM_POOL(DEBUG) << "Occupied memory for " << SpaceTypeToString(type) << " - " << std::dec in AllocRawMemObjectImpl() 243 os::memory::LockHolder lk(lock_); in AllocRawMemImpl() [all …]
|
| /ark/runtime_core/runtime/mem/ |
| D | humongous_obj_allocator-inl.h | 47 os::memory::WriteLockHolder 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() 72 …LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Find reserved memory block with size " << mem_header->GetPo… in Alloc() 79 …LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Find free memory block with size " << mem_header->GetPoolSi… in Alloc() 84 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Can't find memory for this size"; in Alloc() 89 LOG_HUMONGOUS_OBJ_ALLOCATOR(INFO) << "Allocated memory at addr " << std::hex << mem; in Alloc() 100 os::memory::WriteLockHolder wlock(alloc_free_lock_); in Free() 108 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Try to free memory at invalid addr 0"; in FreeUnsafe() 111 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Try to free memory at addr " << std::hex << mem; in FreeUnsafe() [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 … 51 * \brief Initialize an object memory allocated by an allocator. 60 // 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. 140 * \brief Initialize an object memory allocated by an allocator. 149 // without 'volatile' specifier so full memory barrier is required in MemoryInit() 180 * Config for raw memory allocators. 197 * \brief We don't need it for raw memory. [all …]
|
| D | freelist_allocator-inl.h | 49 os::memory::WriteLockHolder 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(INFO) << "Allocated memory at addr " << std::hex << ToVoidPtr(memory_pointe… in Alloc() 136 os::memory::WriteLockHolder wlock(alloc_free_lock_); in Free() [all …]
|
| D | bump-allocator.h | 20 #include <memory> 38 using CommonLock = os::memory::Mutex; 39 using DummyLock = os::memory::DummyLock; 45 // This allocator can allocate memory as a BumpPointerAllocator 46 // and also can allocate big pieces of memory for the TLABs. 51 // | Memory Pool … 53 // | allocated objects | unused memory | memory for TLABs … 57 // |xxxxxxxxxx|xxxxxx|xxxxxxxxx| free memory | TLAB 3 || TLAB 2 || … 110 * \brief Add an extra memory pool to the allocator. 111 * The memory pool must be located just after the current memory given to this allocator. [all …]
|
| D | bump-allocator-inl.h | 69 …LOG_BUMP_ALLOCATOR(DEBUG) << "Expand memory: Add " << std::dec << size << " bytes of memory at add… in ExpandMemory() 82 os::memory::LockHolder lock(allocator_lock_); in Alloc() 83 LOG_BUMP_ALLOCATOR(DEBUG) << "Try to allocate " << std::dec << size << " bytes of memory"; in Alloc() 85 // We need to align up it here to write correct used memory size inside MemStats. in Alloc() 95 // We must take TLABs occupied memory into account. in Alloc() 102 LOG_BUMP_ALLOCATOR(DEBUG) << "Couldn't allocate memory"; in Alloc() 114 os::memory::LockHolder lock(allocator_lock_); in CreateNewTLAB() 139 …LOG_BUMP_ALLOCATOR(DEBUG) << "Don't have enough memory for new TLAB with size " << std::dec << siz… in CreateNewTLAB() 147 os::memory::LockHolder lock(allocator_lock_); in VisitAndRemoveAllPools() 156 os::memory::LockHolder lock(allocator_lock_); in VisitAndRemoveFreePools() [all …]
|
| D | runslots_allocator-inl.h | 50 …LOG_RUNSLOTS_ALLOCATOR(DEBUG) << "Try to allocate " << size << " bytes of memory with align " << a… in Alloc() 71 os::memory::LockHolder list_lock(*runslots_[array_index].GetLock()); in Alloc() 81 os::memory::LockHolder list_lock(*free_runslots_.GetLock()); in Alloc() 89 << "Failed to get new RunSlots from free list, try to allocate one from memory"; in Alloc() 99 os::memory::LockHolder runslots_lock(*runslots->GetLock()); in Alloc() 111 … LOG_RUNSLOTS_ALLOCATOR(INFO) << "Allocate a memory at address " << std::hex << allocated_mem; in Alloc() 113 os::memory::LockHolder list_lock(*runslots_[array_index].GetLock()); in Alloc() 136 os::memory::LockHolder list_lock(*free_runslots_.GetLock()); in ReleaseEmptyRunSlotsPagesUnsafe() 143 os::memory::LockHolder list_lock(*free_runslots_.GetLock()); in ReleaseEmptyRunSlotsPagesUnsafe() 167 os::memory::LockHolder list_lock(*runslots_[array_index].GetLock()); in FreeUnsafeInternal() [all …]
|
| D | freelist_allocator.h | 43 using CommonLock = os::memory::RWLock; 44 using DummyLock = os::memory::DummyLock; 60 // |..Memory..|xxxxxxxxxxOCCUPIEDxxxxxxxxxxxxx|..Memory..|...on...|000000FREE000000|..Memory..|… 69 // |..Memory..||.Padding..||xxxxxxxxxxOCCUPIEDxxxxxxxxxxxxx| 77 // |..Memory..|.Padding|--------|.Padding..||xxxxxxxxxxOCCUPIEDxxxxxxxxxxxxx| 118 * \brief Iterates over all memory pools used by this allocator 129 * \brief Visit memory pools that can be returned to the system in this allocator 259 // If it is off, we insert memory in the list in the descending order. 281 // Each element of this array consists of memory blocks with size 294 // Try to coalesce a memory block with the next and previous blocks. [all …]
|
| D | heap_manager.h | 20 #include <memory> 58 * \brief Allocates memory for Frame, but do not construct it 60 * @return pointer to allocated memory 65 * \brief Frees memory occupied by Frame 122 // Returns the maximum amount of memory a program can consume. 129 // Returns approximate amount of memory currently consumed by an application. 133 // Returns how much free memory we have until we need to grow the heap to perform an allocation. 193 * Initialize GC bits and also zeroing memory for the whole Object memory
|
| /ark/runtime_core/docs/ |
| D | memory-management-SW-requirements.md | 3 The main components of Panda memory management: 12 GC automatically recycles memory that 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) 47 # Key Features of the Memory Management System 71 - Memory management flexible enough to work with multiple languages.
|
| /ark/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 …]
|
| /ark/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 …// Witout full memory barrier it is possible that architectures with weak memory order can try fet… in Create() 100 …// Witout full memory barrier it is possible that architectures with weak memory order can try fet… in Create() 120 …// Witout full memory barrier it is possible that architectures with weak memory order can try fet… in CreateTagged()
|
| /ark/runtime_core/runtime/mem/gc/ |
| D | gc_queue.h | 19 #include <memory> 68 os::memory::LockHolder lock(lock_); in Signal() 74 os::memory::LockHolder lock(lock_); in WaitForGCTask() 88 os::memory::Mutex lock_; 90 os::memory::ConditionVariable cond_var_;
|