Where does “Freeing unused kernel memory” come from?
问题 I often see Freeing unused kernel memory: xxxK (......) from dmesg , but I can never find this log from kernel source code with the help of grep/rg. Where does it come from? 回答1: That line of text does not exist as a single, complete string, hence your failure to grep it. This all gets rolling when free_initmem() in init/main.c calls free_initmem_default() . The line in question originates from free_initmem_default() in include/linux/mm.h : /* * Default method to free all the __init memory