Stream: platform development

Topic: ✔ roc_getppid, roc_mmap, roc_shm_open


view this post on Zulip Oskar Hahn (Nov 26 2023 at 08:44):

Hi,

I am trying to write a simple platform for AoC in Zig.

I understand, why roc needs the function to manage memory (roc_alloc, roc_realloc, roc_dealloc and roc_memset). I also get, why roc_panic is needed.

But what is the reason for roc_getppid, roc_mmap and roc_shm_open? When it is called by roc?

view this post on Zulip Richard Feldman (Nov 26 2023 at 11:47):

good question! Those are currently for dbg, so it can talk to the running compiler over interprocess communication to be able to know how to print things.

these will go away once we have the Inspect ability auto-derived everywhere; at that point, they can all be replaced by a roc_dbg which just needs to print the dbg'd value somewhere

view this post on Zulip Oskar Hahn (Nov 26 2023 at 11:51):

Ah. Thank you. That makes sense.

view this post on Zulip Notification Bot (Nov 26 2023 at 11:51):

Oskar Hahn has marked this topic as resolved.


Last updated: Jul 06 2025 at 12:14 UTC