#ifndef MEMTRACK_H
#define MEMTRACK_H
+#include <pool.h>
+
#ifndef FOURCC
#define FOURCC(a,b,c,d) (((a)<<24)|((b)<<16)|((c)<<8)|(d))
#endif
VOID TrackTag( DWORD Tag );
static inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG Line ) {
- PVOID Out = ExAllocatePool( type, size );
+ PVOID Out = PoolAllocateBuffer( size );
if( Out ) TrackWithTag( EXALLOC_TAG, Out, File, Line );
return Out;
}
static inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) {
UntrackFL(File, Line, Data);
- ExFreePool(Data);
+ PoolFreeBuffer(Data);
}
#define MEMTRACK_MAX_TAGS_TO_TRACK 64
#define Untrack(x)
#define TrackTag(x)
#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z)
-#define exAllocatePool(x,y) ExAllocatePool(x,y)
-#define exFreePool(x) ExFreePool(x)
+#define exAllocatePool(x,y) PoolAllocateBuffer(y)
+#define exFreePool(x) PoolFreeBuffer(x)
#define TrackWithTag(w,x,y,z)
#define UntrackFL(x,y,z)
#endif