I am currently working on embedded linux os booting for which I am trying to fit linux boot within 32 MB system memory. While booting linux kernel I can see kernel is allocating almost 15 MB (15840K reserved as shown below) of memory as reserved,
Memory: 33312K/49152K available (5244K kernel code, 781K rwdata, 984K rodata,
220K init, 268K bss, 15840K reserved, 0K cma-reserved)
For 32MB memory, I see its too large, how can I reduce this? Can we control this memory limit using some kernel config option?
I saw one thread related to same here reserved memory on stack overflow. but it doesn't explain how to limit this memory during kernel boot itself.
As per solution given in this thread for me.
cat /proc/sys/vm/min_free_kbytes
outputs to 768KB only. Which means this 15 Mb looks to free by kernel later?
Here is the snip of free command output in my case.
Note: kernel + rootfs consumes around 12MB space in my space.
Thanks, in advance.
I am expecting kernel should allocate reserved memory around 6 to 7MB during booting Linux kernel itself instead of 15 MB.