!673 Fix : liteos_m核 内存waterline 缺陷BUG

Merge pull request !673 from yinjiaming/fix
This commit is contained in:
openharmony_ci 2022-05-19 09:19:42 +00:00 committed by Gitee
commit a5e651cb01
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -1487,7 +1487,7 @@ STATIC INLINE VOID OsMemMergeNodeForReAllocBigger(VOID *pool, UINT32 allocSize,
#endif
}
OS_MEM_NODE_SET_USED_FLAG(node->sizeAndFlag);
OsMemWaterUsedRecord((struct OsMemPoolHead *)pool, node->sizeAndFlag - nodeSize);
OsMemWaterUsedRecord((struct OsMemPoolHead *)pool, OS_MEM_NODE_GET_SIZE(node->sizeAndFlag) - nodeSize);
#if (LOSCFG_MEM_LEAKCHECK == 1)
OsMemLinkRegisterRecord(node);
#endif