3 ms·
I think you can do this on OS X using the Mach vm_XXX family of functions (I've only used them for querying state, though, rather than rearranging the mappings.
by to3m 11y ago
I think you can do this on OS X using the Mach vm_XXX family of functions (I've only used them for querying state, though, rather than rearranging the mappings.)
The documentation is pretty terrible, though, so some experimentation may be necessary. It's also even less like the POSIX parts than the NS bits are...
(Apple doesn't seem to tell you much; OK references are https://www.gnu.org/software/hurd/gnumach-doc/Virtual-Memory-Interface.html#Virtual-Memory-Interface https://www.gnu.org/software/hurd/gnumach-doc/Virtual-Memory... http://www.amazon.co.uk/Mac-OS-Internals-Systems-Approach/dp/0321278542 http://www.amazon.co.uk/Mac-OS-Internals-Systems-Approach/dp..., and, of course, http://www.opensource.apple.com/source/xnu/ http://www.opensource.apple.com/source/xnu/. The source has some reference-style documentation in it.
- aktau 11y agoThis is mentioned in the comments of the original article, I'll quote: > There are a couple of in-depth articles about implementing this same idea on Mach / OS X: > http://www.mikeash.com/pyblog/friday-qa-2012-02-03-ring-buffers-and-mirrored-memory-part-i.html http://www.mikeash.com/pyblog/friday-qa-2012-02-03-ring-buff... > http://www.mikeash.com/pyblog/friday-qa-2012-02-17-ring-buffers-and-mirrored-memory-part-ii.html http://www.mikeash.com/pyblog/friday-qa-2012-02-17-ring-buff...