I am running Linux on an embedded device with 64MB of physical RAM. Linux prints the following message when it boots:
[ 0.000000] Memory: 58944K/65536K available (3072K
kernel code, 576K rwdata, 832K rodata, 1024K init,
192K bss, 6592K reserved, 0K cma-reserved)
What is the 6592K of ‘reserved’ memory used for? Is it possible to manually change this value? I can’t seem to find any satisfactory explanation for this on the internet.
This answer suggests the ‘reserved’ memory is set by /proc/sys/vm/min_free_kbytes
. However, on my system this prints 971 instead of 6592.
cat /proc/sys/vm/min_free_kbytes
971
Writing new values to /proc/sys/vm/min_free_kbytes
only changes the amount of available
memory displayed by the free
command.
# free -k
total used free shared buff/cache available
Mem: 59968 7036 48132 40 4800 49616
Swap: 0 0 0
# echo 64 > min_free_kbytes
# free -k
total used free shared buff/cache available
Mem: 59968 6900 48264 40 4804 52612
Swap: 0 0 0
#