Re: Memory Mapping examples/documentation?
Re: Memory Mapping examples/documentation?
- Subject: Re: Memory Mapping examples/documentation?
- From: Greg <email@hidden>
- Date: Mon, 3 Mar 2008 14:00:51 -0500
On Mar 3, 2008, at 4:15 AM, Michael Smith wrote:
Can you explain why you think it would be more efficient, or that it
would simplify your code?
I ask because it's possible that it might, but without seeing your
reasoning I can't comment on whether it might actually be, and it's
common for folks to think that mapping would be cheaper when in fact
it's not.
I can only say that I need to be able to move relatively small chunks
of data (around 90 bytes per chunk) in potentially large quantities as
fast as is possible across the kernel/user boundary.
You have to become an I/O Kit extension to use the IODataQueue.
There are other ways to share mapped memory between the kernel and
user space however.
... What would those ways be specifically? All I'd like is some
example code on how to do this in C. Then at least I'd be able to
experiment with both approaches and see which one yields the best
results.
Unless your data is large, you'll tend to find that copying it along
with the notification (as you are currently doing) will be easier
and more efficient than trying to manage a shared memory buffer.
Again, it would help to be able to put this in perspective with your
current workload.
So yeah, like I said above, the data chunks are not large (I don't
think), but I need to be able to move large quantities of them as
quickly as is possible to the user-land program.
Thanks,
- Greg
_______________________________________________
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