Previous Next

Standard Event Objects

The system provides several standard event objects. Drivers can use these event objects to be notified by the system whenever certain conditions occur. The standard event objects are as follows:

\\KernelObjects\HighMemoryCondition
This event is set whenever the amount of free memory exceeds a system-defined amount. Drivers can wait on this event as a signal to aggressively allocate memory.
\\KernelObjects\LowMemoryCondition
This event is set whenever the amount of free memory falls below a system-defined amount. Drivers that have allocated large amounts of memory can wait on this event as a signal to free unused memory.

For Windows Server 2003 and later operating systems, there are several additional standard event objects:

\\KernelObjects\HighPagedPoolCondition
This event is set whenever the amount of free paged pool exceeds a system-defined amount. Drivers can wait on this event as a signal to aggressively allocate memory from paged pool.
\\KernelObjects\LowPagedPoolCondition
This event is set whenever the amount of free paged pool falls below a system-defined amount. Drivers that have allocated large amounts of memory can wait on this event as a signal to free unused memory from paged pool.
\\KernelObjects\HighNonPagedPoolCondition
This event is set whenever the amount of free nonpaged pool exceeds a system-defined amount. Drivers can wait on this event as a signal to aggressively allocate memory from nonpaged pool.
\\KernelObjects\LowNonPagedPoolCondition
This event is set whenever the amount of free nonpaged pool falls below a system-defined amount. Drivers that have allocated large amounts of memory can wait on this event as a signal to free unused memory from nonpaged pool.

Each of these events are notification events. They remain set as long as the triggering condition remains true.

To open a handle to any of these events, use IoCreateNotificationEvent. A driver that waits for any of these events should create a dedicated thread to do the waiting. The thread can wait for one or more of these events by calling either KeWaitForSingleObject or KeWaitForMultipleObjects.