On Sun 26 Mar 2023 at 14:25:21 +0200, Anders Magnusson wrote:
Hi,
I have just checked in fixes for both the "S0 space > 1G" bug and the
CASMAGIC #define.
Have fun!
It still may make the page tables bigger than needed due to double
adding of several memory sizes. For example, in pmap.c, calc_kvmsize():
/*
* Compute the number of pages kmem_arena will have.
*/
kmeminit_nkmempages(); // this calculates nkmempages
...
/* kernel malloc arena */
kvmsize += nkmempages * PAGE_SIZE;
... and then another time ...
/* kernel malloc arena */
kvmsize += avail_end;
What should be the size of the kernel malloc arena? Whatever is
calculated in kmeminit_nkmempages(), or just simply the physical memory size?
Likely not both added together.
So on smaller memory, it seems that some of it is wasted unnecessarily.