harmony 鸿蒙purgeable_memory.h

  • 2023-06-24
  • 浏览 (508)

purgeable_memory.h

Overview

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 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞