3 ms·
There's many ways to go about it, but essentially yes, brk and mmap and a few others just to get into main() for some common run-times. But you can do whatever
by fwsgonzo 2y ago
There's many ways to go about it, but essentially yes, brk and mmap and a few others just to get into main() for some common run-times.
But you can do whatever you want. For example in libriscv I override the global allocator in my guest programs to use a host-managed heap. That way heap usage has native performance in interpreter mode, while also allowing me full control of the heap from the outside. I wrote about this here: https://medium.com/@fwsgonzo/using-c-as-a-scripting-language-part-14-a2cb380b1998 https://medium.com/@fwsgonzo/using-c-as-a-scripting-language...