同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Related Modules:
Description:
Defines pointers to the memory driver functions.
AllocMem )(GrallocBuffer *buffer) |
|
FreeMem )(GrallocBuffer *buffer) |
|
Mmap )(GrallocBuffer *buffer) |
Maps memory with a specified physical address and size to memory without cache in the process's address space. |
MmapCache )(GrallocBuffer *buffer) |
Maps memory with a specified physical address and size to memory with cache in the process's address space. |
Unmap )(GrallocBuffer *buffer) |
Unmaps memory, that is, removes any mappings in the process's address space. |
FlushCache )(GrallocBuffer *buffer) |
Flushes data from the cache to memory and invalidates the data in the cache. |
FlushMCache )(GrallocBuffer *buffer) |
Flushes data from the cache mapping to Mmap to memory and invalidates the data in the cache. |
int32_t(* GrallocFuncs::AllocMem) ([GrallocBuffer](GrallocBuffer.md) *buffer)
Description:
Allocates memory based on the parameters passed by the GUI.
Parameters:
hdl | Indicates the pointer to the handle of memory. |
type | Indicates the type of memory to allocate. The value[/table/tgroup/tbody/row/entry/div {""}) [/table/tgroup/tbody/row/entry/div/div {""}) 0 (div] (div] indicates memory without cache, [/table/tgroup/tbody/row/entry/div {""}) [/table/tgroup/tbody/row/entry/div/div {""}) 1 (div] (div] indicates memory with cache, and[/table/tgroup/tbody/row/entry/div {""}) [/table/tgroup/tbody/row/entry/div/div {""}) 2 (div] (div] indicates shared memory. |
size | Indicates the size of memory to allocate, in bytes. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* GrallocFuncs::FlushCache) ([GrallocBuffer](GrallocBuffer.md) *buffer)
Description:
Flushes data from the cache to memory and invalidates the data in the cache.
Parameters:
hdl | Indicates the pointer to the handle of the cache. |
size | Indicates the size of the cache from which data is to flush. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* GrallocFuncs::FlushMCache) ([GrallocBuffer](GrallocBuffer.md) *buffer)
Description:
Flushes data from the cache mapping to Mmap to memory and invalidates the data in the cache.
Parameters:
hdl | Indicates the pointer to the handle of the cache. |
size | Indicates the size of the cache from which data is to flush. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
void(* GrallocFuncs::FreeMem) ([GrallocBuffer](GrallocBuffer.md) *buffer)
Description:
Releases memory.
Parameters:
hdl | Indicates the pointer to the handle of memory that has been applied for. |
void*(* GrallocFuncs::Mmap) ([GrallocBuffer](GrallocBuffer.md) *buffer)
Description:
Maps memory with a specified physical address and size to memory without cache in the process's address space.
Parameters:
phyAddr | Indicates the physical address of memory to map. |
size | Indicates the size of memory to map. |
Returns:
Returns the pointer to a valid address if the operation is successful; returns NULL otherwise.
void*(* GrallocFuncs::MmapCache) ([GrallocBuffer](GrallocBuffer.md) *buffer)
Description:
Maps memory with a specified physical address and size to memory with cache in the process's address space.
Parameters:
phyAddr | Indicates the physical address of memory to map. |
size | Indicates the size of memory to map. |
Returns:
Returns the pointer to a valid address if the operation is successful; returns NULL otherwise.
int32_t(* GrallocFuncs::Unmap) ([GrallocBuffer](GrallocBuffer.md) *buffer)
Description:
Unmaps memory, that is, removes any mappings in the process's address space.
Parameters:
virAddr | Indicates the pointer to the virtual address of memory to unmap. |
size | Indicates the size of memory to unmap. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。