lkml.org 
[lkml]   [2019]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] mm/kmemleak: record the current memory pool size
Date
The only way to obtain the current memory pool size for a running kernel
is to check back the kernel config file which is inconvenient. Record it
in the kernel messages.

Signed-off-by: Qian Cai <cai@lca.pw>
---
mm/kmemleak.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index b8bbe9ac5472..1f74f8bcb4eb 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1967,7 +1967,8 @@ static int __init kmemleak_late_init(void)
mutex_unlock(&scan_mutex);
}

- pr_info("Kernel memory leak detector initialized\n");
+ pr_info("Kernel memory leak detector initialized (mem pool size: %d)\n",
+ mem_pool_free_count);

return 0;
}
--
1.8.3.1
\
 
 \ /
  Last update: 2019-08-14 21:08    [W:0.052 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site