Reputation: 462
I am doing some memory introspection and it requires me to know how proc/$pid/maps is created. I'm a bit confused by the code found in http://lxr.free-electrons.com/source/fs/proc/base.c on line 2750 I notice that there is a definition in this struct for maps but I want to know for each pid_entry which kernel function creates the maps file. A link to the kernel module or block of code is sufficient.
Upvotes: 1
Views: 2667
Reputation:
You did something weird with the link.
Clicking through few definitions reveals the file is generated on demand here: https://github.com/torvalds/linux/blob/bcf876870b95592b52519ed4aafcf9d95999bc9c/fs/proc/task_mmu.c#L271
(at least for the common mmu case)
the usual question: why are you asking?
Upvotes: 2