I think I found another solution that doesn't require me to use mach_make_memory_entry. Instead I use vm_remap to map the server memory into the client's address space, and vm_deallocate to revoke the client's rights when necessary. The reason I didn't use this approach in the first place was that vm_remap doesn't let you change the protection (the client needs read-only access in certain cases), but now I just remap first into server space, protect the server's copy, then remap it into client space. The reason I don't want to do what you've suggested, with the server remapping the memory as a copy (on write) for itself is that it does use up more resources (eventually most of the memory will have to be copied) and that the server keeps all sorts of pointers into that memory so I don't want to have to change its base address. Thanks for your replies, Jim. _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Dan Bernstein