Home
last modified time | relevance | path

Searched refs:memory (Results 1 – 25 of 1252) sorted by relevance

12345678910>>...51

/ohos5.0/docs/en/device-dev/kernel/
H A Dkernel-mini-basic-memory.md8memory management module manages the memory usage of users and the OS by allocating and releasing
14 - Dynamic memory: memory blocks of user-specified size allocated in the dynamic memory pool.
18 - Static memory: memory blocks of the fixed size (preset during initialization) allocated in the st…
32 ![](figures/static-memory.png "static-memory")
40 Use static memory allocation to obtain memory blocks of the fixed size. When the memory is no longe…
53memory| **LOS_MemboxAlloc**: allocates a memory block from a specified static memory pool.<br>**LO…
57memory blocks in the memory pool after initialization is not equal to the total memory size divide…
64 1. Plan a memory area as a static memory pool.
85 2. Allocate a memory block from the static memory pool.
170memory management allows memory blocks of any size to be allocated from a large contiguous memory
[all …]
H A Dkernel-small-basic-memory-heap.md6memory resources of the system. Memory management involves memory initialization, allocation, and …
10memory management, a type of dynamic memory management, allows memory blocks of any size to be all…
40memory management is mainly used to dynamically allocate and manage memory ranges requested by use…
105memory structure information of the specified memory pool, including the free memory, used memory,…
131 >- The dynamic memory module manages memory through control block structures, which consume extra…
132 …s consume extra memory for memory alignment, which may cause memory loss. When the memory used for…
145memory pool has free memory blocks greater than the requested size. If yes, the system allocates a…
158 2. Allocate a memory block from the dynamic memory pool.
161 5. Release the memory block.
185 /* Allocate memory.*/
[all …]
H A Dkernel-small-debug-memory-info.md6 …rmation includes the memory pool size, memory usage, remaining memory size, maximum free memory, m…
8memory waterline indicates the maximum memory used in a memory pool. The waterline value is update…
10memory pool. If the fragmentation rate is high, there are a large number of free memory blocks in …
32 UINT32 maxFreeNodeSize; // Maximum size of the free memory block in the memory pool.
33 UINT32 usedNodeNum; // Number of non-free memory blocks in the memory pool.
34 UINT32 freeNodeNum; // Number of free memory blocks in the memory pool.
43memory fragmentation rate, call **LOS_MemInfoGet** to obtain the remaining memory size and the max…
45 Fragmentation rate = 100 – 100 x Maximum free memory block size/Remaining memory size
56 3. Calculate the memory usage and fragmentation rate.
78 /* Calculate the fragmentation rate of the memory pool. */
[all …]
H A Dkernel-mini-memory-debug.md4memory debugging is to locate problems related to dynamic memory. The kernel provides a variety of…
12 …rmation includes the memory pool size, memory usage, remaining memory size, maximum free memory, m…
14 …dicates the maximum memory used in a memory pool. The waterline value is updated upon each memory
18 - You can use [APIs for memory management](kernel-mini-basic-memory.md) to scan node information in…
38 UINT32 maxFreeNodeSize; // Maximum size of the free memory block in the memory pool.
39 UINT32 usedNodeNum; // Number of non-free memory blocks in the memory pool.
40 UINT32 freeNodeNum; // Number of free memory blocks in the memory pool.
49memory fragmentation rate, call **LOS_MemInfoGet** to obtain the remaining memory size and the max…
86 /* Calculate the memory usage of the memory pool. */
166 > Enabling memory leak check affects memory application performance. LR addresses will be recorded …
[all …]
H A Dkernel-small-debug-user.md4 …sms, such as memory leak check, heap memory statistics, memory corruption check, and backtrace, to…
18 When memory is released, the system matches the memory node control block based on the memory addre…
22 ![](figures/heap-memory-node-linked-list.png "heap-memory-node-linked-list")
28 ![](figures/heap-memory-node-information.png "heap-memory-node-information")
32memory is released, the input parameter pointer in the **free** API is used to match the **ptr** f…
62 ![](figures/process-of-releasing-memory.png "process-of-releasing-memory")
116memory debugging is enabled, a heap memory leak check and a heap memory integrity check will be pe…
188 ==PID:4== Heap memory statistics(bytes): // Heap memory statistics
215 ==PID:4== Detected memory leak(s):
263 ==PID:4== Detected memory leak(s):
[all …]
H A Dkernel-small-basic-memory-physical.md13 ![](figures/physical-memory-usage-distribution.png "physical-memory-usage-distribution")
17 - Requesting memory
22 ![](figures/requesting-memory.png "requesting-memory")
25 - Releasing memory
30 ![](figures/releasing-memory.png "releasing-memory")
99memory. Heap management APIs are recommended for requesting small amount of memory. Physical memor…
132 // Handle the physical memory
134 // Free the physical memory
169 // Free the physical memory
195 // Handle the physical memory
[all …]
H A Dkernel-small-basic-memory-virtual.md16 …em&nbsp;zone | Addresses for allocating contiguous virtual memory. The mapped physical memory bloc…
38 …/mapping-between-the-virtual-and-physical-memory-addresses.png "mapping-between-the-virtual-and-ph…
46 **Table 3** APIs of the virtual memory management module
70 | LOS_SetRegionTypeFile | Sets the file memory mapping attributes. |
90 | LOS_VMalloc | Requests memory using **vmalloc**.|
91 | LOS_VFree | Releases memory using **vmalloc**.|
94 **Table 7** APIs for memory allocation
98 …es memory from the heap memory pool if the requested memory is less than 16 KiB; allocates multipl…
115 To use APIs related to virtual memory:
123 3. Call **vmalloc** APIs (see table 6) and memory allocation APIs (see table 7) to apply for memory
[all …]
H A Dkernel-mini-memory-lms.md10 - Supports check of multiple memory pools.
21memory mapping to mark the system memory state. There are three states: **Accessible**, **RedZone*…
23 - After memory is allocated from the heap, the shadow memory in the data area is set to the **Acces…
25 - When memory is released from the heap, the shadow memory of the released memory is set to the **F…
29 - When memory is released, the tool checks the state value of the shadow memory at the released add…
41 | Deleting a memory pool from the LMS check linked list| LOS_LmsCheckPoolDel | Cancels the validity…
42 …ing a specified memory chunk| LOS_LmsAddrProtect | Locks a memory chunk to prevent it from being r…
93 The memory problem detected will be displayed.
180 [ERR][TestLmsTsk]Shadow memory address: [0x21041e84 : 6] Shadow memory value: [2]
234 [ERR][TestLmsTsk]Shadow memory address: [0x21041e85 : 2] Shadow memory value: [3]
[all …]
H A Dkernel-small-debug-memory-leak.md6memory leak check is used to locate dynamic memory leak problems. After this function is enabled, …
21 Correctly setting this macro can ignore invalid LRs and reduce memory consumption.
29memory leak in key code logic. If this function is enabled, LR information is recorded each time w…
45 > Enabling memory leak check affects memory application performance. LR addresses will be recorded …
54 2. Simulate a memory leak by requesting memory without releasing it.
58 4. Compare the logs to obtain information about the node where a memory leak occurred.
84 /* Create a memory pool. */
93 /* Release the memory pool. */
105 /* Log for the first OsMemUsedNodeShow. Because the memory pool is not allocated, there is no memor…
109 /* Log for the second OsMemUsedNodeShow. There are two memory nodes. */
[all …]
H A Dkernel-small-debug-memory-corrupt.md6 …el, memory corruption check is used to check the integrity of a dynamic memory pool. This mechanis…
13 If this macro is enabled, the memory pool integrity will be checked in real time upon each memory a…
17memory node and provides information about the previous node (because memory is contiguous, a node…
20memory corruption check is enabled, a magic number is added to the node header, which increases th…
28 …grityCheck** to check for memory corruption. If no memory corruption occurs, **0** is returned and…
35 1. Request two physically adjacent memory blocks.
39 3. Call **LOS_MemIntegrityCheck** to check for memory corruption.
57 /* Request two physically adjacent memory blocks. */
60 …ess to cause memory corruption. The memory block of the first node is 8 bytes. Clearing 12 bytes o…
74 [ERR][OsMemMagicCheckPrint], 2028, memory check error!
[all …]
H A Dkernel-small-debug-shell-cmd-oom.md6 This command is used to query and set the low memory threshold and the PageCache reclaim threshold.
29 …mem byte] | Sets the low memory threshold (in MB). | 0 to 1<br>The value **0** means…
30 …e] | Sets the PageCache reclaim threshold. | Low memory threshold to the maximum available memo…
39 > If the system memory is insufficient, the system displays a message indicating the insufficiency.
58 oom low memory threshold: 0x80000(byte)
59 oom reclaim memory threshold: 0x500000(byte)
63 Information displayed when the system memory is insufficient:
68 [oom] OS is in low memory state
69 total physical memory: 0x1bcf000(byte), used: 0x1b50000(byte) ,free: 0x7f000(byte), low memory thre…
126memory state<br>total physical memory: 0x1bcf000(byte), used: 0x1b50000(byte), free: 0x7f000(byte)…
[all …]
/ohos5.0/base/hiviewdfx/faultloggerd/test/unittest/unwind/
H A Dmemory_test.cpp61 memory->SetCtx(&ctx);
116 memory->SetCtx(&ctx);
155 memory->SetCtx(&ctx);
185 memory->SetCtx(&ctx);
212 memory->SetCtx(&ctx);
234 memory->SetCtx(&ctx);
260 memory->SetCtx(&ctx);
303 memory->SetCtx(&ctx);
353 memory->SetCtx(&ctx);
395 memory->SetCtx(&ctx);
[all …]
H A Ddwarf_test.cpp72 explicit DwarfSectionTest(std::shared_ptr<DfxMemory> memory) : DwarfSection(memory) {}; in DwarfSectionTest() argument
264 memory->Reset(); in Test05()
418 memory->Reset(); in Test09()
456 memory->Reset(); in Test10()
816 DwarfOpTest op(memory);
840 DwarfOpTest op(memory);
865 DwarfOpTest op(memory);
899 DwarfOpTest op(memory);
936 DwarfOpTest op(memory);
970 DwarfOpTest op(memory);
[all …]
H A Darm_exidx_test.cpp66 ArmExidx exidx(memory);
84 ArmExidx exidx(memory);
107 ArmExidx exidx(memory);
165 ArmExidx exidx(memory);
185 ArmExidx exidx(memory);
205 ArmExidx exidx(memory);
226 ArmExidx exidx(memory);
249 ArmExidx exidx(memory);
272 ArmExidx exidx(memory);
295 ArmExidx exidx(memory);
[all …]
/ohos5.0/docs/en/application-dev/reference/common/
H A Dpurgeable__memory_8h.md6 The **purgeable_memory.h** file declares the APIs for managing purgeable memory at the native layer.
14 [Memory](memory.md)
25 …ry_ModifyFunc](memory.md#oh_purgeablememory_modifyfunc)) (void \*, size_t, void \*) | Defines the …
33 | [OH_PurgeableMemory_Destroy](memory.md#oh_purgeablememory_destroy) ([OH_PurgeableMemory](memory.m…
34memory.md#oh_purgeablememory_beginread) ([OH_PurgeableMemory](memory.md#oh_purgeablememory) \*purg…
35memory.md#oh_purgeablememory_endread) ([OH_PurgeableMemory](memory.md#oh_purgeablememory) \*purgOb…
36memory.md#oh_purgeablememory_beginwrite) ([OH_PurgeableMemory](memory.md#oh_purgeablememory) \*pur…
37memory.md#oh_purgeablememory_endwrite) ([OH_PurgeableMemory](memory.md#oh_purgeablememory) \*purgO…
38 …y_GetContent](memory.md#oh_purgeablememory_getcontent) ([OH_PurgeableMemory](memory.md#oh_purgeabl…
39 …_ContentSize](memory.md#oh_purgeablememory_contentsize) ([OH_PurgeableMemory](memory.md#oh_purgeab…
[all …]
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/av_transport/common/src/
H A Dav_sync_utils.cpp68 memory.name.c_str(), memory.size, memory.fd); in CloseAVTransSharedMemory()
69 if (IsInValidSharedMemory(memory)) { in CloseAVTransSharedMemory()
73 if (memory.fd > 0) { in CloseAVTransSharedMemory()
74 (void)::close(memory.fd); in CloseAVTransSharedMemory()
81 memory.name.c_str(), memory.size, memory.fd); in WriteClockUnitToMemory()
88 int size = AshmemGetSize(memory.fd); in WriteClockUnitToMemory()
122 memory.name.c_str(), memory.size, memory.fd); in ReadClockUnitFromMemory()
169 memory.name.c_str(), memory.size, memory.fd); in WriteFrameInfoToMemory()
201 memory.name.c_str(), memory.size, memory.fd); in ReadFrameInfoFromMemory()
232 memory.name.c_str(), memory.size, memory.fd); in ResetSharedMemory()
[all …]
/ohos5.0/docs/zh-cn/application-dev/reference/common/
H A Dpurgeable__memory_8h.md14 [Memory](memory.md)
24 | [OH_PurgeableMemory](memory.md#oh_purgeablememory) | 用于定义OH_PurgeableMemory数据类型名称。 |
32 | \*[OH_PurgeableMemory_Create](memory.md#oh_purgeablememory_create) (size_t size, [OH_PurgeableMem…
33 | [OH_PurgeableMemory_Destroy](memory.md#oh_purgeablememory_destroy) ([OH_PurgeableMemory](memory.m…
34 | [OH_PurgeableMemory_BeginRead](memory.md#oh_purgeablememory_beginread) ([OH_PurgeableMemory](memo…
35 | [OH_PurgeableMemory_EndRead](memory.md#oh_purgeablememory_endread) ([OH_PurgeableMemory](memory.m…
36 | [OH_PurgeableMemory_BeginWrite](memory.md#oh_purgeablememory_beginwrite) ([OH_PurgeableMemory](me…
37 | [OH_PurgeableMemory_EndWrite](memory.md#oh_purgeablememory_endwrite) ([OH_PurgeableMemory](memory
38 | [OH_PurgeableMemory_GetContent](memory.md#oh_purgeablememory_getcontent) ([OH_PurgeableMemory](me…
39 | [OH_PurgeableMemory_ContentSize](memory.md#oh_purgeablememory_contentsize) ([OH_PurgeableMemory](
[all …]
/ohos5.0/foundation/multimedia/image_effect/frameworks/native/effect/manager/memory_manager/
H A Deffect_memory_manager.cpp57 memory->memDataType_ = memDataType; in AddFilterMemory()
59 AddMemory(memory); in AddFilterMemory()
90 memory->memoryData_ = memoryData; in AllocMemoryInner()
91 memory->isAllowModify_ = true; in AllocMemoryInner()
93 return memory; in AllocMemoryInner()
99 if (!memory->isAllowModify_ || memory->memoryData_->data == srcAddr) { in AllocMemory()
126 AddMemory(memory); in AllocMemory()
128 return memory->memoryData_.get(); in AllocMemory()
134 CHECK_AND_RETURN_LOG(memory->memoryData_ != nullptr && memory->memoryData_->data != nullptr, in AddMemory()
145 for (auto &memory : memorys_) { in GetAllocMemoryByAddr() local
[all …]
/ohos5.0/foundation/multimedia/media_foundation/src/common/
H A Davsharedmemorypool.cpp60 idleList_.push_back(memory); in Init()
73 memory->Init(); in AllocMemory()
74 int32_t ret = memory->Init(); in AllocMemory()
78 return memory; in AllocMemory()
87 if (*iter != memory) { in ReleaseMemory()
105 delete memory; in ReleaseMemory()
188 if (!DoAcquireMemory(size, &memory) || memory != nullptr) { in AcquireMemory()
200 busyList_.push_back(memory); in AcquireMemory()
208 delete memory; in AcquireMemory()
232 delete memory; in Reset()
[all …]
/ohos5.0/commonlibrary/memory_utils/
H A DREADME.md28 | libmeminfo | memory manager service |
29 | libmemleak | memory manager service |
36 /utils/memory
38 │   ├── include # DMA memory allocation system library header directory
39 │   ├── src # DMA memory allocation system library source directory
43 ├── libpurgeable # Purgeable memory management library
44 └── libspeculative # Speculative memory management library
53memory system library provides interfaces for the multimedia service to allocate and share shared
57 It provides interfaces for memory usage queries. It is used for memory footprint query, low memory
61 It cooperates with malloc_debug to detect memory leaks of native heap.
[all …]
/ohos5.0/docs/en/device-dev/faqs/
H A Dfaqs-porting.md6 - The following table describes the macros for configuring the kernel heap memory. You can configur…
8 **Table 1** Macros for configuring the kernel heap memory
12memory or the user heap memory will be used. The default value is **0** and indicates that the int…
13 | LOSCFG_SYS_HEAP_ADDR | Specifies the start address of the kernel heap memory. |
14 …SCFG_SYS_HEAP_SIZE | Specifies the size of the kernel heap memory, that is, size of the memory blo…
18 … specified heap memory range is not used by other modules. Otherwise, functions of the heap memory
/ohos5.0/foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/
H A Dneural_network_runtime_compat.cpp150 if (memory == nullptr) { in OH_NNExecutor_DestroyInputMemory()
154 if (*memory == nullptr) { in OH_NNExecutor_DestroyInputMemory()
166 *memory = nullptr; in OH_NNExecutor_DestroyInputMemory()
175 if (memory == nullptr) { in OH_NNExecutor_DestroyOutputMemory()
179 if (*memory == nullptr) { in OH_NNExecutor_DestroyOutputMemory()
191 *memory = nullptr; in OH_NNExecutor_DestroyOutputMemory()
205 if (memory == nullptr) { in OH_NNExecutor_SetInputWithMemory()
211 return executorImpl->SetInputFromMemory(inputIndex, *tensor, *memory); in OH_NNExecutor_SetInputWithMemory()
215 uint32_t outputIndex, const OH_NN_Memory *memory) in OH_NNExecutor_SetOutputWithMemory() argument
221 if (memory == nullptr) { in OH_NNExecutor_SetOutputWithMemory()
[all …]
/ohos5.0/foundation/multimedia/av_codec/services/engine/common/
H A Dcodec_utils.cpp64 memory->Write(scaleData[0] + srcPos, writeSize, dstPos); in WriteYuvDataStride()
106 memory->Write(scaleData[0] + srcPos, writeSize, dstPos); in WriteRgbDataStride()
128 memory->GetCapacity(), frameSize); in WriteYuvData()
130 memory->Write(scaleData[0], ySize); in WriteYuvData()
131 memory->Write(scaleData[1], uvSize); in WriteYuvData()
132 memory->Write(scaleData[2], uvSize); // 2 in WriteYuvData()
134 memory->Write(scaleData[0], ySize); in WriteYuvData()
135 memory->Write(scaleData[1], uvSize); in WriteYuvData()
148 memory->GetCapacity(), frameSize); in WriteRgbData()
149 memory->Write(scaleData[0], frameSize); in WriteRgbData()
[all …]
/ohos5.0/docs/en/device-dev/porting/
H A Dporting-chip-faqs.md6 The following table describes the macros for configuring the kernel heap memory. You can configure …
8 **Table 1** Macros for configuring the kernel heap memory
12memory or the user heap memory will be used. The default value is **0** and indicates that the int…
13 | LOSCFG_SYS_HEAP_ADDR | Specifies the start address of the kernel heap memory. |
14 | LOSCFG_SYS_HEAP_SIZE | Specifies the size of the kernel heap memory, that is, size of the memory
19 … specified heap memory range is not used by other modules. Otherwise, functions of the heap memory
/ohos5.0/docs/zh-cn/device-dev/kernel/
H A Dkernel-small-plimits.md13 - memory限制器:限制plimits组内所有进程的内存使用总和。
31 │ │ ├─memory.failcnt
32 │ │ ├─memory.limit
33 │ │ ├─memory.peak
34 │ │ ├─memory.usage
35 │ │ ├─memory.oom_ctrl
36 │ │ └─memory.stat
51 3. memory限制器:
53 **图3** memory限制器配置
203 //limit memory
[all …]

12345678910>>...51