Export (0) Print
Expand All
Expand Minimize

EngAllocMem function

The EngAllocMem function allocates a block of memory and inserts a caller-supplied tag before the allocation.

Syntax


PVOID EngAllocMem(
  _In_  ULONG Flags,
  _In_  ULONG MemSize,
  _In_  ULONG Tag
);

Parameters

Flags [in]

Specifies how to allocate memory. This parameter can be a combination of the following values.

ValueMeaning

FL_NONPAGED_MEMORY

Allocate memory from the nonpaged pool. If this flag is not set, the memory is allocated from the system's paged pool.

FL_ZERO_MEMORY

Zero-initialize the allocated memory. If this flag is not set, the memory is returned uninitialized.

 

MemSize [in]

Specifies the number of bytes to allocate.

Tag [in]

Specifies a 4-byte pool tag that uniquely identifies the driver that does the memory allocation. For more information about pool tags, see ExAllocatePoolWithTag.

Return value

EngAllocMem returns a pointer to the allocated memory if the system has enough memory to satisfy the request; otherwise, it returns a null pointer.

Remarks

When the memory is no longer needed, it should be freed by a call to the EngFreeMem function.

Requirements

Version

Available in Windows 2000 and later versions of the Windows operating systems.

Header

Winddi.h (include Winddi.h)

Library

Win32k.lib

DLL

Win32k.sys

See also

EngFreeMem

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft