Foundation.NSDataReadingOptions Enumeration
Flags that determine how NSData loads files.

Syntax

[ObjCRuntime.Native]
[System.Flags]
public enum NSDataReadingOptions

Remarks

By default NSData will loads the contents of the file in memory by allocating a block of memory and then reading the contents of the file into it.

The Mapped and MappedAlways parameter instruct NSData to use the kernel's interface to map the file into the process address space. This has a few advantages: instead of allocating read/write memory for the process, that becomes real memory usage, the mapped versions map the file into memory which means that the data is loaded on demand instead of being loaded upfront. This also allows the kernel to discard the data loaded from memory when the system is running low on memory.

Members

Member NameDescription
CoordinatedDocumentation for this section has not yet been entered.
MappedUse the kernel's virtual memory map to load the file, if possible. If sucessful, this replaces read/write memory that can be very expensive with discardable memory that is backed by a file.
MappedAlwaysForce NSData to try to use the kernel's mapping support to load the file. If sucessful, this replaces read/write memory that can be very expensive with discardable memory that is backed by a file.
UncachedNotify the kernel that it should not try to cache the contents of this file in its buffer cache.

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0