NdisAllocateMemoryWithTagPriority 函数 (ndis.h)
NDIS 驱动程序调用 NdisAllocateMemoryWithTagPriority 函数从非分页池分配内存池。
语法
PVOID NdisAllocateMemoryWithTagPriority(
[in] NDIS_HANDLE NdisHandle,
[in] UINT Length,
[in] ULONG Tag,
[in] EX_POOL_PRIORITY Priority
);
参数
[in] NdisHandle
初始化期间调用方获得的 NDIS 句柄。 例如,微型端口驱动程序可以使用从中获取的 NDIS 句柄 NdisMRegisterMiniportDriver 或 MiniportInitializeEx 函数。 其他 NDIS 驱动程序可以使用以下函数中的句柄:
[in] Length
要分配的大小(以字节为单位)。
[in] Tag
一个字符串,用单引号分隔,最多四个字符,通常按反向顺序指定。 此调用的 NDIS 提供的默认标记为“maDN”,但调用方可以通过提供显式值来替代此默认值。
[in] Priority
此请求的重要性。 有关详细信息,请参阅 ExAllocatePoolWithTagPriority。
返回值
NdisAllocateMemoryWithTagPriority 返回指向已分配内存的基本虚拟地址的指针,或者 NULL(如果当前没有足够的非分页内存不可用)。
言论
若要释放使用 NdisAllocateMemoryWithTagPriority分配的内存,请调用 NdisFreeMemoryWithTagPriority 或 NdisFreeMemory 函数。
要求
要求 | 价值 |
---|---|
最低支持的客户端 | NDIS 6.0 及更高版本中受支持。 |
目标平台 | 普遍 |
标头 | ndis.h (包括 Ndis.h) |
库 | Ndis.lib |
IRQL | <= DISPATCH_LEVEL |
DDI 符合性规则 | Irql_Miscellaneous_Function(ndis), NdisAllocateMemoryWithTagPriority(ndis), NdisAllocateMemoryWithTagPriority_Cleanup(ndis), NdisAllocateMemoryWithTagPriority_InitFail(ndis) |