HyperDbg Debugger
Loading...
Searching...
No Matches
PoolManager.h
Go to the documentation of this file.
1
12#pragma once
13
15// Definition //
17
22#define MaximumRequestsQueueDepth 300
23#define NumberOfPreAllocatedBuffers 10
24
26// Structures //
28
33typedef struct _POOL_TABLE
34{
35 UINT64 Address; // Should be the start of the list as we compute it as the start address
36 SIZE_T Size;
38 LIST_ENTRY PoolsList;
42
44
56
58// Variables //
60
66
72
77volatile LONG LockForReadingPool;
78
84
90
96
98// Functions //
100
101// ----------------------------------------------------------------------------
102// Private Interfaces
103//
104
108static BOOLEAN
110
112
113// ----------------------------------------------------------------------------
114// Public Interfaces
115//
116
124
130VOID
UCHAR BOOLEAN
Definition BasicTypes.h:39
#define VOID
Definition BasicTypes.h:33
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned int UINT32
Definition BasicTypes.h:48
enum _POOL_ALLOCATION_INTENTION POOL_ALLOCATION_INTENTION
Inum of intentions for buffers (buffer tag)
POOL_TYPE SIZE_T NumberOfBytes
Definition Hooks.h:167
VOID PlmgrFreeRequestNewAllocation(VOID)
Definition PoolManager.c:37
BOOLEAN PlmgrAllocateRequestNewAllocation(SIZE_T NumberOfBytes)
Allocate global requesting variable.
Definition PoolManager.c:21
struct _POOL_TABLE POOL_TABLE
Table of holding pools detail structure.
volatile LONG LockForReadingPool
Spinlock for reading pool.
Definition PoolManager.h:77
struct _REQUEST_NEW_ALLOCATION REQUEST_NEW_ALLOCATION
Manage the requests for new allocations.
struct _POOL_TABLE * PPOOL_TABLE
BOOLEAN g_IsNewRequestForAllocationReceived
We set it when there is a new allocation.
Definition PoolManager.h:83
volatile LONG LockForRequestAllocation
Request allocation Spinlock.
Definition PoolManager.h:71
REQUEST_NEW_ALLOCATION * g_RequestNewAllocation
If sb wants allocation from vmx root, adds it's request to this structure.
Definition PoolManager.h:65
BOOLEAN g_IsNewRequestForDeAllocation
We set it when there is a new allocation.
Definition PoolManager.h:89
LIST_ENTRY g_ListOfAllocatedPoolsHead
Create a list from all pools.
Definition PoolManager.h:95
BOOLEAN PoolManagerInitialize()
Initializes the Pool Manager and pre-allocate some pools.
Definition PoolManager.c:53
struct _REQUEST_NEW_ALLOCATION * PREQUEST_NEW_ALLOCATION
VOID PoolManagerUninitialize()
De-allocate all the allocated pools.
Definition PoolManager.c:87
Table of holding pools detail structure.
Definition PoolManager.h:34
UINT64 Address
Definition PoolManager.h:35
BOOLEAN ShouldBeFreed
Definition PoolManager.h:40
BOOLEAN AlreadyFreed
Definition PoolManager.h:41
BOOLEAN IsBusy
Definition PoolManager.h:39
POOL_ALLOCATION_INTENTION Intention
Definition PoolManager.h:37
LIST_ENTRY PoolsList
Definition PoolManager.h:38
SIZE_T Size
Definition PoolManager.h:36
Manage the requests for new allocations.
Definition PoolManager.h:50
UINT32 Count
Definition PoolManager.h:52
SIZE_T Size
Definition PoolManager.h:51
POOL_ALLOCATION_INTENTION Intention
Definition PoolManager.h:53