对操作系统来说,Buffers和Cached是已经被使用的(上图Mem:这一行)
MemFree=total-used314952=24946552-24631600
对应用程序来说(上图对应-/+ buffers/cache那一行)
MemFree=buffers+cached+free19536392=152116+19069324+314952
[root@dvrdvs bin] # free total used free shared buffers Mem: 37820 37316 504 0 704 Swap: 0 0 0Total: 37820 37316 504[root@dvrdvs bin] # cat /proc/meminfo MemTotal: 37820 kBMemFree: 500 kBBuffers: 704 kBCached: 12512 kBSwapCached: 0 kBActive: 11516 kBInactive: 11176 kBActive(anon): 9708 kBInactive(anon): 8160 kBActive(file): 1808 kBInactive(file): 3016 kBUnevictable: 0 kBMlocked: 0 kBSwapTotal: 0 kBSwapFree: 0 kBDirty: 0 kBWriteback: 0 kBAnonPages: 9500 kBMapped: 4452 kBShmem: 8392 kBSlab: 6432 kBSReclaimable: 600 kBSUnreclaim: 5832 kBKernelStack: 592 kBPageTables: 196 kBNFS_Unstable: 0 kBBounce: 0 kBWritebackTmp: 0 kBCommitLimit: 18908 kBCommitted_AS: 88428 kBVmallocTotal: 966656 kBVmallocUsed: 20720 kBVmallocChunk: 918896 kB[root@dvrdvs bin] #
[root@dvrdvs app] # free total used free shared buffers Mem: 38064 23212 14852 0 36 Swap: 0 0 0Total: 38064 23212 14852[root@dvrdvs app] # hik_echo 3 > /proc/sys/vm/drop_caches [root@dvrdvs app] # free total used free shared buffers Mem: 38064 22984 15080 0 32 Swap: 0 0 0Total: 38064 22984 15080[root@dvrdvs app] # cat /proc/cmdline mem=42M console=ttyS0,115200n8 kdbg=7