Re:Show HN: Running TempleOS in user space without virtualiz...
by 1fishe2fishe on Friday April 12, 2024 @11:53PM
(#40020352)
Thanks for the information, I wasn't aware of that! Seems like it's not available on FreeBSD though ;( I want to support as many OS'es as possible, but I'll still add a comment on that for future reference.
Re:Show HN: Running TempleOS in user space without virtualiz...
by xyproto on Saturday April 13, 2024 @03:21AM
(#40021206)
Could it be enabled with a define or other compile-time mechanism for Linux?
Re:Show HN: Running TempleOS in user space without virtualiz...
by 1fishe2fishe on Saturday April 13, 2024 @05:07AM
(#40021667)
Yeah, I could just use that flag on Linux and let the kernel do more work but I'm afraid I might have to add more logic for looping for a failed mmap only for linux, and more ifdefs usually mean I'm doing something wrong. I'd rather roll with my current strategy (finding a safe pivot and keep bumping without checking anything)
That seems about right[1], but the MAP_FIXED_NOREPLACE flag has been a thing since Linux 4.17. What about using that?
[1]: https://godbolt.org/z/698dPcvf6