Uros Popovic writes hands-on posts on low-level systems: RISC-V, no-MMU Linux, custom kernels, bare metal Rust and USB devices.
HN links it for the no-MMU Linux on RISC-V post and the micro Linux distro walkthrough. One commenter wonders why the work runs only in QEMU.
Thanks! I was able to find some additional info on no-MMU Linux [1], [2], [3]. It seems position-independent executables are the norm on regular (MMU) Linux now anyway (and probably have been for a long time). I took a look under the covers of uClibc and it seems like malloc just delegates most of its work to mmap, at least for the malloc-simple implementation [4]. That implies to me that different processes' heaps can be interleaved (without overlapping), but the kernel manages the allocations.
[1]: https://maskray.me/blog/2024-02-20-mmu-less-systems-and-fdpic
[2]: https://popovicu.com/posts/789-kb-linux-without-mmu-riscv/
[3]: https://www.kernel.org/doc/Documentation/nommu-mmap.txt
[4]: https://github.com/kraj/uClibc/blob/ca1c74d67dd115d059a875150e10b8560a9c35a8/libc/stdlib/malloc-simple/alloc.c#L23
Quite interesting. But given it run in qemu I wonder why not develop his https://popovicu.com/posts/making-a-micro-linux-distro/into a more general one and then hightlight this variation in a short article on the difference.
See also this post by the author:
Making a micro Linux distro [for RISC-V]
https://popovicu.com/posts/making-a-micro-linux-distro/