mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
procfs/meminfo: free delaylist for PROTECTED
This triggers `mm_free_delaylist()` before dumping status in PROTECTED build, otherwise the `free` command still shows delaylist as `used`. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
@@ -314,6 +314,13 @@ static ssize_t meminfo_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
buffer += copysize;
|
buffer += copysize;
|
||||||
buflen -= copysize;
|
buflen -= copysize;
|
||||||
|
|
||||||
|
/* Trigger reclamation of delay list otherwise they will be
|
||||||
|
* counted as used, which often confuses people like memory
|
||||||
|
* leakages. see pull/12817 for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
mm_free_delaylist(entry->heap);
|
||||||
|
|
||||||
/* Show heap information */
|
/* Show heap information */
|
||||||
|
|
||||||
info = mm_mallinfo(entry->heap);
|
info = mm_mallinfo(entry->heap);
|
||||||
|
|||||||
Reference in New Issue
Block a user