I want to make a module that will analyze memory usage of different processes. my idea was to parse ps -eo pid,vsz,rss
. But I was wondering if it is possible to make the kernel call my module on each memory allocation/deallocation. Is it possible in andriod x86?
Asked
Active
Viewed 232 times
1

yukashima huksay
- 5,834
- 7
- 45
- 78
-
3perhaps you're looking for advice on modifying the Linux kernel. In this case, you're better off on stackoverflow. However, do some initial research on modifying and recompiling the kernel -- and only then ask a specific question there. We already have some (closed) questions on how to get started with Kernel programming. Hope this helps. – Sebastian Dec 23 '17 at 16:57
-
Use malloc debug ? https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md – steve Dec 23 '17 at 18:40
-
Possible duplicate of [How Can I Count malloc in linux kernel with kprobe](https://stackoverflow.com/questions/14476325/how-can-i-count-malloc-in-linux-kernel-with-kprobe) – rajaganesh87 Dec 29 '17 at 08:15