偶然發現這個問題,執行這個命令,網上說是內存的映射,是不佔用實際空間的,可是還是感覺怪怪的,希望專業人士解釋一下。
# ll /proc/kcore -h
-r-------- 1 root root 128T Mar 15 14:40 /proc/kcore
摘自一段原文解釋:
/proc/kcore is like an "alias" for the memory in your computer. Its
size is the same as the amount of RAM you have, and if you read it as
a file, the kernel does memory reads.
其大致意識就是 kcore 相當於內存的別名,變相代表著內存,可以當做內存文件執行內存讀取,其實通過不同的命令查看該文件所顯示的大小也是不一致的,例如:
ls -lh /proc/kcore
du -hs /proc/kcore
你可以試試。
實際並不佔用硬盤。說明你的內存很大……
原文出處:linux - /proc/kcore文件特别大,感觉很不正常,有人能解释一下么? - SegmentFault 思否