Re: Memory-mapped sub-data?
Re: Memory-mapped sub-data?
- Subject: Re: Memory-mapped sub-data?
- From: Jens Alfke <email@hidden>
- Date: Mon, 27 Feb 2017 11:11:27 -0800
> On Feb 27, 2017, at 10:02 AM, Chris Ridd <email@hidden> wrote:
>
> It isn’t NSData, but libdispatch’s dispatch_data_t might be a useful way forward. The dispatch_data_create(3) man page says it avoids "copying the represented memory as much as possible.”
There’s some kind of bridging between the two — in the debugger I’ve seen NSData objects (passed to my NSURLSession delegates) that have some internal subclass name implying they’re bridged dispatch_data_t’s. (I don’t know if this is toll-free or not, but it would be easy to do an experiment.)
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden