StorPortAllocateContiguousMemorySpecifyCacheNode function (storport.h)
The StorPortAllocateContiguousMemorySpecifyCacheNode routine allocates a range of physically contiguous noncached, nonpaged memory.
Syntax
ULONG StorPortAllocateContiguousMemorySpecifyCacheNode(
[in] PVOID HwDeviceExtension,
[in] SIZE_T NumberOfBytes,
[in] PHYSICAL_ADDRESS LowestAcceptableAddress,
[in] PHYSICAL_ADDRESS HighestAcceptableAddress,
[in, optional] PHYSICAL_ADDRESS BoundaryAddressMultiple,
[in] MEMORY_CACHING_TYPE CacheType,
[in] NODE_REQUIREMENT PreferredNode,
[out] PVOID *BufferPointer
);
Parameters
[in] HwDeviceExtension
A pointer to the hardware device extension for the host bus adapter (HBA).
[in] NumberOfBytes
The number of bytes to allocate.
[in] LowestAcceptableAddress
The lowest physical address that is valid for the allocation. For example, if the device can only reference physical memory in the 8 MB to 16 MB range, this value would be set to 0x800000 (8 MB).
[in] HighestAcceptableAddress
The highest physical address that is valid for the allocation. For example, if the device can only reference physical memory below 16 MB, this value would be set to 0xFFFFFF (16 MB - 1).
[in, optional] BoundaryAddressMultiple
The physical address multiple that this allocation must not cross.
[in] CacheType
The desired cache type for the mapping.
[in] PreferredNode
The preferred node from which the allocation should be made if pages are available on that node.
[out] BufferPointer
The variable that receives the starting address of the allocated memory block. Upon return from this routine, if this variable is zero, a contiguous range could not be found to satisfy the request. If this variable is not NULL, it contains a pointer (for example, a virtual address in the nonpaged portion of the system) to the allocated physically contiguous memory.
Return value
The StorPortAllocateContiguousMemorySpecifyCacheNode routine returns one of the following status codes:
Return code | Description |
---|---|
|
This function is not implemented on the active operating system. |
|
The operation was successful. |
|
The operation failed to allocate the requested memory because of insufficient resources. |
Remarks
If the request fails, BufferPointer will be set to NULL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows 7. |
Target Platform | Universal |
Header | storport.h (include Storport.h) |
IRQL | <=DISPATCH_LEVEL |
DDI compliance rules | StorPortIrql(storport) |