mirror of
https://gitee.com/openharmony/commonlibrary_memory_utils
synced 2024-11-27 01:11:24 +00:00
commit
d4cb661839
@ -39,6 +39,15 @@ public:
|
||||
* While return true if content recover success.
|
||||
* OS cannot reclaim the memory of the obj's content when this
|
||||
* function return true, until EndRead() is called.
|
||||
*
|
||||
* Attension: the return value must be recevied and handled,
|
||||
* since the visiting of this object with the failure result
|
||||
* will cause unsuspected result.
|
||||
* For example:
|
||||
* if (BeginRead()) {
|
||||
* // visit this object
|
||||
* EndRead();
|
||||
* }
|
||||
*/
|
||||
bool BeginRead();
|
||||
|
||||
@ -50,13 +59,22 @@ public:
|
||||
void EndRead();
|
||||
|
||||
/*
|
||||
* BeginRead: begin read the PurgeableMem obj.
|
||||
* BeginRead: begin write the PurgeableMem obj.
|
||||
* Return: return true if the obj's content is present.
|
||||
* If content is purged(no present), system will recover its data,
|
||||
* return false if content is purged and recover failed.
|
||||
* While return true if content recover success.
|
||||
* OS cannot reclaim the memory of the obj's content when this
|
||||
* function return true, until EndRead() is called.
|
||||
* function return true, until EndWrite() is called.
|
||||
*
|
||||
* Attension: the return value must be recevied and handled,
|
||||
* since the visiting of this object with the failure result
|
||||
* will cause unsuspected result.
|
||||
* For example:
|
||||
* if (BeginWrite()) {
|
||||
* // visit this object
|
||||
* EndWrite();
|
||||
* }
|
||||
*/
|
||||
|
||||
bool BeginWrite();
|
||||
|
@ -108,6 +108,15 @@ bool OH_PurgeableMemory_Destroy(OH_PurgeableMemory *purgObj);
|
||||
* OS cannot reclaim the memory of @purgObj's content when this
|
||||
* function return true, until PurgMemEndRead() is called.
|
||||
*
|
||||
* Attension: the return value must be recevied and handled,
|
||||
* since the visiting of this object with the failure result
|
||||
* will cause unsuspected result.
|
||||
* For example:
|
||||
* if (OH_PurgeableMemory_BeginRead()) {
|
||||
* // visit this object
|
||||
* OH_PurgeableMemory_EndRead();
|
||||
* }
|
||||
*
|
||||
* @since 10
|
||||
* @version 1.0
|
||||
*/
|
||||
@ -138,6 +147,15 @@ void OH_PurgeableMemory_EndRead(OH_PurgeableMemory *purgObj);
|
||||
* OS cannot reclaim the memory of @purgObj's content when this
|
||||
* function return true, until PurgMemEndWrite() is called.
|
||||
*
|
||||
* Attension: the return value must be recevied and handled,
|
||||
* since the visiting of this object with the failure result
|
||||
* will cause unsuspected result.
|
||||
* For example:
|
||||
* if (OH_PurgeableMemory_BeginWrite()) {
|
||||
* // visit this object
|
||||
* OH_PurgeableMemory_EndWrite();
|
||||
* }
|
||||
*
|
||||
* @since 10
|
||||
* @version 1.0
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user