From: Qian Cai Date: Mon, 23 Sep 2019 22:34:07 +0000 (-0700) Subject: mm/kmemleak.c: record the current memory pool size X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~3761^2~107 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=0e965a6bda80f3227dfb74af6ae644e396beaacb;p=linux.git mm/kmemleak.c: record the current memory pool size The only way to obtain the current memory pool size for a running kernel is to check the kernel config file which is inconvenient. Record it in the kernel messages. [akpm@linux-foundation.org: s/memory pool size/memory pool/available/, per Catalin] Link: http://lkml.kernel.org/r/1565809631-28933-1-git-send-email-cai@lca.pw Signed-off-by: Qian Cai Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/kmemleak.c b/mm/kmemleak.c index b8bbe9ac5472..03a8d84badad 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 available: %d)\n", + mem_pool_free_count); return 0; }