23#ifndef __FX_POOL_INLINES_HPP__
24#define __FX_POOL_INLINES_HPP__
28#if defined(EVENT_TRACING)
29#include "FxPoolInlines.hpp.tmh"
57 "Size overflow, could not add pool header, %!STATUS!",
status);
62 if (FxDriverGlobals->IsPoolTrackingOn()) {
68 "Size overflow, could not add pool tracker, %!STATUS!",
status);
115 Tracker->Pool =
Pool;
116 Tracker->Size =
Size;
117 Tracker->CallersAddress = Caller;
124 Pool->NonPagedAllocations++;
126 if(
Pool->NonPagedBytes >
Pool->PeakNonPagedBytes ) {
127 Pool->PeakNonPagedBytes =
Pool->NonPagedBytes;
130 if(
Pool->NonPagedAllocations >
Pool->PeakNonPagedAllocations ) {
131 Pool->PeakNonPagedAllocations =
Pool->NonPagedAllocations;
160 Tracker->Pool->NonPagedLock.Acquire(&
irql);
164 Tracker->Pool->NonPagedBytes -= Tracker->Size;
165 Tracker->Pool->NonPagedAllocations--;
167 Tracker->Pool->NonPagedLock.Release(
irql);
205 Tracker->Pool =
Pool;
206 Tracker->Size =
Size;
207 Tracker->CallersAddress = Caller;
209 Pool->PagedLock.Acquire();
214 Pool->PagedAllocations++;
216 if(
Pool->PagedBytes >
Pool->PeakPagedBytes ) {
217 Pool->PeakPagedBytes =
Pool->PagedBytes;
220 if(
Pool->PagedAllocations >
Pool->PeakPagedAllocations ) {
221 Pool->PeakPagedAllocations =
Pool->PagedAllocations;
224 Pool->PagedLock.Release();
248 Tracker->Pool->PagedLock.Acquire();
252 Tracker->Pool->PagedBytes -= Tracker->Size;
253 Tracker->Pool->PagedAllocations--;
255 Tracker->Pool->PagedLock.Release();
#define NT_SUCCESS(StatCode)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
_Must_inspect_result_ _In_ USHORT NewSize
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define FX_POOL_HEADER_SIZE
FX_POOL_TRACKER * PFX_POOL_TRACKER
VOID __inline FxPoolRemoveNonPagedAllocateTracker(__in PFX_POOL_TRACKER Tracker)
_Must_inspect_result_ NTSTATUS __inline FxPoolAddHeaderSize(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in size_t AllocationSize, __out size_t *NewSize)
VOID __inline FxPoolInsertNonPagedAllocateTracker(__in PFX_POOL Pool, __in PFX_POOL_TRACKER Tracker, __in SIZE_T Size, __in ULONG Tag, __in PVOID Caller)
VOID __inline FxPoolRemovePagedAllocateTracker(__in PFX_POOL_TRACKER Tracker)
VOID __inline FxPoolInsertPagedAllocateTracker(__in PFX_POOL Pool, __in PFX_POOL_TRACKER Tracker, __in SIZE_T Size, __in ULONG Tag, __in PVOID Caller)
#define _Must_inspect_result_
#define TRACE_LEVEL_ERROR
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size