Re: Equivalent of Linux kmap on Mac OS
Re: Equivalent of Linux kmap on Mac OS
- Subject: Re: Equivalent of Linux kmap on Mac OS
- From: Michael Smith <email@hidden>
- Date: Fri, 9 Mar 2007 00:40:11 -0800
On Mar 7, 2007, at 2:31 PM, Bhavesh Davda wrote:
Sure sounds like I can
1. IOMemoryDescriptor::initWithAddress(userAddr,..., kernel_task) to
map the user address into the kernel map, and
2. prepare() to wire the address down.
Whoa, hold it right there.
Before we help you any more, I want a promise out of you. This chunk
of memory is *small*, right? A couple of pages at most, right? And
you set this up once and then keep using it for a long time, right?
Otherwise the deal's off. No more helping.
The kernel is *not* in the business of handing out chunks of its
virtual address space to arbitrary processes.
As Terry suggests, you are better off allocating the space in the
kernel, and then vending mappings of that space to user tasks as they
come and go.
I'm still curious as to why you think you want to share memory like
this; there are better ways to do most of the common things that I
can think of.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden