NdisAllocateMemoryWithTag allocates resident (nonpaged) system-space memory.
NDIS_STATUS
NdisAllocateMemoryWithTag(
OUT PVOID *VirtualAddress,
IN UINT Length,
IN ULONG Tag
);
NdisAllocateMemoryWithTag can return either of the following:
Declared in Ndis.h. Include Ndis.h.
A call to NdisAllocateMemoryWithTag is equivalent to calling NdisAllocateMemory, except that NdisAllocateMemoryWithTag allows the caller to supply a tag that appears in any crash dump of the system that occurs subsequently.
During driver development on a checked build of the system, this function also can be useful for crash debugging. Calling this routine, rather than NdisAllocateMemory, inserts the caller-supplied tag into a crash dump of pool memory.
The Tag passed to this function is more readable if its characters are reversed when NdisAllocateMemoryWithTag is called. For example, if a caller passes 'Fred' as a Tag, it would appear as 'derF' if pool is dumped or when tracking pool usage in the debugger. The NDIS-supplied default tag appears as 'NDam' (indicating NDIS allocate memory) when pool is dumped.
Callers of NdisAllocateMemoryWithTag can be running at IRQL <= DISPATCH_LEVEL.
MiniportInitialize, NdisAllocateMemory, NdisFreeMemory, NdisMAllocateSharedMemory, NdisMSetAttributes, NdisMSetAttributesEx