Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mapping files to memory using Carbon -or- getting a FD from a ForkRefNum



Greetings,

I'm trying to map a portion of a file to memory. The file uses the FS APIs and is already open via FSOpenFork. The open fork is used by a ton of other code, so I really don't want to rewrite all of this to use another API.

The File-System Performance Guidelines document explains how to map a file to memory, but the only API they give is mmap(), which requires a POSIX file descriptor.

So ... is there an Carbon function for mapping a file to memory given an open fork reference?

... or is there a way to turn a fork reference into a usable file descriptor? I thought I remembered that there was some way of doing this, but a search of the ADC site has turned up nothing. I either remembered wrong, or I'm using the wrong keywords.

... or do I just have to open the file again using open()?
--
James Bucanek

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.