StorPortAllocatePool function (storport.h)

The StorPortAllocatePool routine allocates a block of non-contiguous, non-paged pool memory.

Syntax

ULONG StorPortAllocatePool(
  [in]  PVOID HwDeviceExtension,
  [in]  ULONG NumberOfBytes,
  [in]  ULONG Tag,
  [out] PVOID *BufferPointer
);

Parameters

[in] HwDeviceExtension

A pointer to the hardware device extension for the host bus adapter (HBA).

[in] NumberOfBytes

The size, in bytes, of the block of memory being allocated.

[in] Tag

The pool tag for the allocated memory. Drivers specify the pool tag as a string of four ASCII characters, delimited by single quotation marks. The string is usually specified in reverse order.

[out] BufferPointer

A pointer to the address of the allocated memory block or NULL if not successful.

Return value

StorPortAllocatePool returns one of the following status codes:

Return code Description
STOR_STATUS_NOT_IMPLEMENTED This function is not implemented on the active operating system.
STOR_STATUS_SUCCESS Indicates that the routine successfully allocated a memory block of the requested size.
STOR_STATUS_INVALID_PARAMETER The pointer to receive the buffer address is NULL.
STOR_STATUS_INVALID_IRQL The call was made at an invalid IRQL.
STOR_STATUS_INSUFFICIENT_RESOURCES Unable to allocate memory of the requested size.

Remarks

A miniport driver calls the StorPortAllocatePool routine to allocate a block of non-contiguous memory from the non-paged pool. To free the block of memory, the miniport driver calls StorPortFreePool. If the request fails, BufferPointer will be set to NULL.

Requirements

Requirement Value
Target Platform Universal
Header storport.h (include Storport.h)
IRQL <=DISPATCH_LEVEL
DDI compliance rules StorPortAllocatePool(storport), StorPortAllocatePool2(storport), StorPortIrql(storport)

See also

StorPortFreePool