Answers:
内核通过/ proc / slabinfo导出此信息。它不是很容易阅读,因此还有一个slabtop工具(来自procps,您可能已经安装了它)。
我通常使用这种调用,但是请查看手册页以了解它还能做什么:
slabtop -s c
AFAIK,SLAB是内核的几种内存分配器之一
内核使用更多的内存
看到 "smem -twk"
例如ubuntu桌面
# smem -twk
Area Used Cache Noncache
firmware/hardware 0 0 0
kernel image 0 0 0
kernel dynamic memory 1.1G 802.0M 299.7M
userspace memory 2.2G 218.1M 2.0G
free memory 440.1M 440.1M 0
----------------------------------------------------------
3.7G 1.4G 2.3G
# slabtop -s c
Active / Total Objects (% used) : 486431 / 618408 (78,7%)
Active / Total Slabs (% used) : 17621 / 17621 (100,0%)
Active / Total Caches (% used) : 77 / 108 (71,3%)
Active / Total Size (% used) : 157060,61K / 182206,62K (86,2%)
Minimum / Average / Maximum Object : 0,01K / 0,29K / 8,00K