jmarsh wrote on 2020-11-29, 03:53:
latalante wrote on 2020-11-28, 23:55:
Unless I'm overlooking something they are skipping over a much simpler solution: linux has memfd_create to associate an fd with memory, avoiding the shmem/tmpfile requirement.
(Maybe a mod could move the dynrec vs. w^x discussion to the other thread? I created it specifically for discussions like this...)
That's what I thought: Linux had a more direct interface to allocate shared memory objects to a file descriptor. I'm told you can also send that file descriptor over a socket, and you can "seal" the memfd as read-only and against further modifications so the recipient can't go scribble on it. Pretty interesting stuff. No /dev/shm required.
As for Mac OS X, I see Apple lists vm_remap in their typical style of absolutely terrible documentation.
https://developer.apple.com/documentation/ker … ap?language=occ
They're worse than early 1990s Microsoft documentation. At least Microsoft attempted to describe what the function does and what the parameters mean.
Here, Apple is like "here's the declaration from the header files, we don't feel like describing the function parameters, return value, or even what the hell they mean or how you get your own vm process map. You figure it out, we don't care." If I have to go to some web page on MIT's website to actually read about the function, and comb through the "open source Darwin" part of Apple's site to try to understand it, then you completely suck at your job, Apple Development website. And yet, nobody describes how the hell you get your own VM map handle whatever-the-hell-it-is for yourself so you can use it.
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.