Hacker News new | ask | show | jobs
by charcircuit 1183 days ago
>Is there a better way?

Just let the kernel handle it. The virtual memory and mapped memory abstraction the kernel has makes your program's implementation simpler.

1 comments

Zig is a low-level language. You might not have an MMU. You might not have a kernel. You might be the kernel.
Maybe if we went back a few decades. But in 2023 having access to a MMU and a kernel is normal.
No it is not for many applications. The entire embedded software engineering field is an example.
>The entire embedded software engineering field is an example.

This is simply false. Most devices are moving in this direction. Practically all phones people use are using a kernel that supports virtual memory. TVs now come with Linux too. All sorts of random devices use Linux now that powerful and cheap chips exist.