Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8582141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:13:14+00:00 2026-06-11T21:13:14+00:00

I am restricted to using CoreFoundation in a particular app, and don’t have access

  • 0

I am restricted to using CoreFoundation in a particular app, and don’t have access to NSData.

I need to access data from a file using memory mapping because the file could be quite large. With NSData, I can achieve this using the +dataWithContentsOfURL:options:error: method, passing in the NSDataReadingMappedAlways option.

Is it possible to do this with CFData? The only function I can find to actually create a CFData object directly from a file is the CFURLCreateDataAndPropertiesFromResource() function, which does not have any option to set the memory mapping flag.

Is there a lower-level way to load a CFData object from a file using memory-mapped reads? Do I have to drop down to mmap or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:13:15+00:00Added an answer on June 11, 2026 at 9:13 pm

    You can create a CFData() from a byte buffer and a count. Given this, you should just be able to mmap() the file in question, and then pass the mapped byte buffer over to CFDataCreateWithBytesNoCopy(). The only real complication is you’ll need to use a CFAllocatorRef that knows how to munmap() as the bytesDeallocator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app using forms authentication and I have restricted a folder
I have a table with white-space set to nowrap and columns widths restricted using
I need to restrict user access to filebrowser using permissions. For example, only users
I query my Database using NHibernate. Now I need to restrict the data being
I am using jQuery's Datepicker for a textbox as below. I have restricted the
On my home page I have restricted the number of recent posts displayed using
Is there anyway to restrict by using pre-processing directives to prevent a project from
The dilemma I'm using a before_filter in my controller that restricts access to admins.
The HTTP 1.1 RFC restricts a Client from using more than Two TCP connections
I have a bit of .NET code that retrieves the results from an Oracle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.