+
+/*! @function setPurgeable
+ @abstract Control the purgeable status of a memory descriptors memory.
+ @discussion Buffers may be allocated with the ability to have their purgeable status changed - IOBufferMemoryDescriptor with the kIOMemoryPurgeable option, VM_FLAGS_PURGEABLE may be passed to vm_allocate() in user space to allocate such buffers. The purgeable status of such a buffer may be controlled with setPurgeable(). The process of making a purgeable memory descriptor non-volatile and determining its previous state is atomic - if a purgeable memory descriptor is made nonvolatile and the old state is returned as kIOMemoryPurgeableVolatile, then the memory's previous contents are completely intact and will remain so until the memory is made volatile again. If the old state is returned as kIOMemoryPurgeableEmpty then the memory was reclaimed while it was in a volatile state and its previous contents have been lost.
+ @param newState - the desired new purgeable state of the memory:<br>
+ kIOMemoryPurgeableKeepCurrent - make no changes to the memory's purgeable state.<br>
+ kIOMemoryPurgeableVolatile - make the memory volatile - the memory may be reclaimed by the VM system without saving its contents to backing store.<br>
+ kIOMemoryPurgeableNonVolatile - make the memory nonvolatile - the memory is treated as with usual allocations and must be saved to backing store if paged.<br>
+ kIOMemoryPurgeableEmpty - make the memory volatile, and discard any pages allocated to it.
+ @param oldState - if non-NULL, the previous purgeable state of the memory is returned here:<br>
+ kIOMemoryPurgeableNonVolatile - the memory was nonvolatile.<br>
+ kIOMemoryPurgeableVolatile - the memory was volatile but its content has not been discarded by the VM system.<br>
+ kIOMemoryPurgeableEmpty - the memory was volatile and has been discarded by the VM system.<br>
+ @result An IOReturn code. */
+
+ virtual IOReturn setPurgeable( IOOptionBits newState,
+ IOOptionBits * oldState );
+ OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 3);
+
+/*! @function performOperation
+ @abstract Perform an operation on the memory descriptor's memory.
+ @discussion This method performs some operation on a range of the memory descriptor's memory. When a memory descriptor's memory is not mapped, it should be more efficient to use this method than mapping the memory to perform the operation virtually.
+ @param options The operation to perform on the memory:<br>
+ kIOMemoryIncoherentIOFlush - pass this option to store to memory and flush any data in the processor cache for the memory range, with synchronization to ensure the data has passed through all levels of processor cache. It may not be supported on all architectures. This type of flush may be used for non-coherent I/O such as AGP - it is NOT required for PCI coherent operations. The memory descriptor must have been previously prepared.<br>
+ kIOMemoryIncoherentIOStore - pass this option to store to memory any data in the processor cache for the memory range, with synchronization to ensure the data has passed through all levels of processor cache. It may not be supported on all architectures. This type of flush may be used for non-coherent I/O such as AGP - it is NOT required for PCI coherent operations. The memory descriptor must have been previously prepared.
+ @param offset A byte offset into the memory descriptor's memory.
+ @param length The length of the data range.
+ @result An IOReturn code. */
+
+ virtual IOReturn performOperation( IOOptionBits options,
+ IOByteCount offset, IOByteCount length );
+ OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 4);
+