harmony 鸿蒙purgeable_memory.h

  • 2025-06-12
  • 浏览 (3)

purgeable_memory.h

Overview

The purgeable_memory.h file declares the APIs for managing purgeable memory at the native layer.

Since

10

Related Modules

Memory

Summary

Types

Name Description
OH_PurgeableMemory Defines the type name of the OH_PurgeableMemory data.
(*OH_PurgeableMemory_ModifyFunc) (void *, size_t, void *) Defines the function for rebuilding purgeable memory data.

Functions

Name Description
*OH_PurgeableMemory_Create (size_t size, OH_PurgeableMemory_ModifyFunc func, void *funcPara) Creates a PurgeableMemory object.
OH_PurgeableMemory_Destroy (OH_PurgeableMemory *purgObj) Destroys a PurgeableMemory object.
OH_PurgeableMemory_BeginRead (OH_PurgeableMemory *purgObj) Starts a read operation on a PurgeableMemory object. If purgeable memory is reclaimed, the rebuilding function is called to rebuild it.
OH_PurgeableMemory_EndRead (OH_PurgeableMemory *purgObj) Ends a read operation on a PurgeableMemory object. Now the system can reclaim purgeable memory.
OH_PurgeableMemory_BeginWrite (OH_PurgeableMemory *purgObj) Begins a write operation on the PurgeableMemory object. If purgeable memory is reclaimed, the rebuilding function is called to rebuild it.
OH_PurgeableMemory_EndWrite (OH_PurgeableMemory *purgObj) Ends a write operation on the PurgeableMemory object. Now the system can reclaim purgeable memory.
OH_PurgeableMemory_GetContent (OH_PurgeableMemory *purgObj) Obtains the memory data of a PurgeableMemory object.
OH_PurgeableMemory_ContentSize (OH_PurgeableMemory *purgObj) Obtains the memory data size of a PurgeableMemory object.
OH_PurgeableMemory_AppendModify (OH_PurgeableMemory *purgObj, OH_PurgeableMemory_ModifyFunc func, void *funcPara) Adds a function for modifying a PurgeableMemory object.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Common Capabilities

harmony 鸿蒙_j_s_v_m

harmony 鸿蒙JSVM_CallbackStruct

harmony 鸿蒙JSVM_CreateVMOptions

harmony 鸿蒙JSVM_ExtendedErrorInfo

harmony 鸿蒙JSVM_HeapStatistics

harmony 鸿蒙JSVM_InitOptions

harmony 鸿蒙JSVM_PropertyDescriptor

harmony 鸿蒙JSVM_PropertyHandlerConfigurationStruct

harmony 鸿蒙JSVM_ScriptOrigin

0  赞