Hacker News new | ask | show | jobs
by co_dh 1632 days ago
github? I like the idea of using Nim to write a kernel, and is curious on what the code looks like. Especially, how do you avoid malloc?
1 comments

I wasn't ready to share it yet, but here it goes[1]. It's at a very early stage, but should give you an idea of how to get things up and running under Nim.

I didn't avoid malloc. I provided a simple bump pointer based heap to get things going. Later I'll have to separate things into a UEFI bootloader and a proper kernel image, each with its own allocator (the bootloader will use UEFI memory allocation services, and the kernel will have its own heap).

[1] https://github.com/khaledh/axiom