External Publication
Visit Post

KL-OS: Memory Allocation

scientiac December 28, 2025
Source

Day 7 was about Memory Allocation. First the memory regions were defined in the linker script so that it can determine the position to avoid overlapping the memory to kernel's static data.

The size of the memory space was 64 * 1024 * 1024 bytes or 64MB and it is aligned to a 4KB boundary.

Then a function alloc_pages was implemented which allocated n pages of memory and returned it's starting address.

Discussion in the ATmosphere

Loading comments...