- @abstract Standard factory method for IORangeAllocator.
- @discussion This method allocates and initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance.
- @param endOfRange If the free list is to contain an initial fragment, set endOfRange to the last offset in the range, ie. size - 1, to create a free fragment for the range zero to endOfRange inclusive. If zero is passed the free list will be initialized empty, and can be populated with calls to the deallocate method.
- @param defaultAlignment If this parameter is non-zero it specifies a required alignment for all allocations, for example pass 256 to align allocations on 256 byte boundaries. Zero or one specify unaligned allocations.
- @param capacity Sets the initial size of the free list in number of non-contiguous fragments. This value is also used for the capacityIncrement.
- @param options Pass kLocking if the instance can be used by multiple threads.
- @result Returns the new IORangeAllocator instance, to be released by the caller, or zero on failure. */
-
- static IORangeAllocator * withRange( IORangeScalar endOfRange,
- IORangeScalar defaultAlignment = 0, UInt32 capacity = 0,
- IOOptionBits options = 0 );
-
- virtual void free();
- virtual bool serialize(OSSerialize *s) const;
+ * @abstract Standard factory method for IORangeAllocator.
+ * @discussion This method allocates and initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance.
+ * @param endOfRange If the free list is to contain an initial fragment, set endOfRange to the last offset in the range, ie. size - 1, to create a free fragment for the range zero to endOfRange inclusive. If zero is passed the free list will be initialized empty, and can be populated with calls to the deallocate method.
+ * @param defaultAlignment If this parameter is non-zero it specifies a required alignment for all allocations, for example pass 256 to align allocations on 256 byte boundaries. Zero or one specify unaligned allocations.
+ * @param capacity Sets the initial size of the free list in number of non-contiguous fragments. This value is also used for the capacityIncrement.
+ * @param options Pass kLocking if the instance can be used by multiple threads.
+ * @result Returns the new IORangeAllocator instance, to be released by the caller, or zero on failure. */
+
+ static OSPtr<IORangeAllocator> withRange( IORangeScalar endOfRange,
+ IORangeScalar defaultAlignment = 0,
+ UInt32 capacity = 0,
+ IOOptionBits options = 0 );
+
+ virtual void free() APPLE_KEXT_OVERRIDE;
+ virtual bool serialize(OSSerialize *s) const APPLE_KEXT_OVERRIDE;