Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5f1db805 authored by Li Zefan's avatar Li Zefan Committed by Gerrit - the friendly Code Review server
Browse files

kmemleak: allow freeing internal objects after kmemleak was disabled



Currently if kmemleak is disabled, the kmemleak objects can never be
freed, no matter if it's disabled by a user or due to fatal errors.

Those objects can be a big waste of memory.

    OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
  1200264 1197433  99%    0.30K  46164       26    369312K kmemleak_object

With this patch, after kmemleak was disabled you can reclaim memory
with:

	# echo clear > /sys/kernel/debug/kmemleak

Also inform users about this with a printk.

Change-Id: I13fdd5f0439bf6bc23824d37a44813eb0fe6a392
Signed-off-by: default avatarLi Zefan <lizefan@huawei.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Git-commit: c89da70c7360294e715df5abd4b7239db3274c86
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/


Signed-off-by: default avatarVignesh Radhakrishnan <vigneshr@codeaurora.org>
parent ed912065
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment