※ 引述《chang0206 (Eric Chang)》之銘言:
: 今天早上無意中發現的這個檔案
: [root proc]#ls -laS --block=G
: ---
: lrwxrwxrwx 1 root root 1G 2010-07-21 10:57 net -> self/net
: lrwxrwxrwx 1 root root 1G 2010-07-21 10:57 mounts -> self/mounts
: lrwxrwxrwx 1 root root 1G 2010-07-21 10:17 self -> 18805
: dr-xr-xr-x. 24 root root 1G 2010-07-13 17:55 ..
: -r-------- 1 root root 131072G 2010-07-21 10:57 kcore
: What the HELL is that !?
: 一個檔案居然用了 130T 的空間!?!?!?130T耶!真的是見鬼了!
: 去GOOGLE了一下,發現這個檔案不會用到真正的硬碟空間,
: 然後是跟記憶體MAPPING有關。
: 那問題來了,我的記憶體也只有裝8G啊?
: 是要怎麼弄出130T的mapping出來啊 @@
這是一個好問題耶。
man proc 可以看到 proc file system 的說明。
/ kcore 可以看到 kcore 的說明:
This file represents the physical memory of the system and is
stored in the ELF core file format. With this pseudo-file, and
an unstripped kernel (/usr/src/linux/vmlinux) binary, GDB can be
used to examine the current state of any kernel data structures.
The total length of the file is the size of physical memory
(RAM) plus 4KB.
這樣,應該有解決你的疑問吧?
--
人不作出犧牲,便得不到任何收穫;如果要得到某種東西,就必須付出同等代價。這一點
,就是鍊金術的基本原則 ── 等價交換。當時我們深信這一點就是世界的真理。
阿爾風斯‧愛力克,《鋼之鍊金術師》開場白
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.116.231.92