Headers of pool manager.
More...
Go to the source code of this file.
Headers of pool manager.
- Author
- Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
- Version
- 0.1
- Date
- 2020-04-11
- Copyright
- This project is released under the GNU Public License v3.
◆ MaximumRequestsQueueDepth
#define MaximumRequestsQueueDepth 300 |
Maximum Pool Requests (while not allocated)
◆ NumberOfPreAllocatedBuffers
#define NumberOfPreAllocatedBuffers 10 |
◆ POOL_TABLE
Table of holding pools detail structure.
◆ PPOOL_TABLE
◆ PREQUEST_NEW_ALLOCATION
◆ REQUEST_NEW_ALLOCATION
Manage the requests for new allocations.
◆ PoolManagerInitialize()
Initializes the Pool Manager and pre-allocate some pools.
- Returns
- BOOLEAN
Initializes the Pool Manager and pre-allocate some pools.
- Returns
- BOOLEAN
54{
55
56
57
60 {
61 LogError(
"Err, insufficient memory");
63 }
64
65
66
67
69
70
71
72
74
75
76
77
79}
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
#define LogError(format,...)
Log in the case of error.
Definition HyperDbgHyperLogIntrinsics.h:113
BOOLEAN PlmgrAllocateRequestNewAllocation(SIZE_T NumberOfBytes)
Allocate global requesting variable.
Definition PoolManager.c:21
struct _REQUEST_NEW_ALLOCATION REQUEST_NEW_ALLOCATION
Manage the requests for new allocations.
#define MaximumRequestsQueueDepth
Maximum Pool Requests (while not allocated)
Definition PoolManager.h:22
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
FORCEINLINE VOID InitializeListHead(_Out_ PLIST_ENTRY ListHead)
Definition Windows.h:41
◆ PoolManagerUninitialize()
VOID PoolManagerUninitialize |
( |
| ) |
|
De-allocate all the allocated pools.
- Returns
- VOID
De-allocate all the allocated pools.
- Returns
- VOID
88{
89 PLIST_ENTRY ListTemp = 0;
91
93
95 {
96 ListTemp = ListTemp->Flink;
97
98
99
100
102
103
104
105
107 {
109 }
110
111
112
113
115
116
117
118
120 }
121
123
125}
VOID PlatformMemFreePool(PVOID BufferAddress)
Free (dellocate) a non-paged buffer.
Definition Mem.c:86
VOID PlmgrFreeRequestNewAllocation(VOID)
Definition PoolManager.c:37
volatile LONG LockForReadingPool
Spinlock for reading pool.
Definition PoolManager.h:77
struct _POOL_TABLE * PPOOL_TABLE
void SpinlockLock(volatile LONG *Lock)
Tries to get the lock and won't return until successfully get the lock.
Definition Spinlock.c:52
void SpinlockUnlock(volatile LONG *Lock)
Release the lock.
Definition Spinlock.c:158
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition Windows.h:56
Table of holding pools detail structure.
Definition PoolManager.h:34
UINT64 Address
Definition PoolManager.h:35
BOOLEAN AlreadyFreed
Definition PoolManager.h:41
LIST_ENTRY PoolsList
Definition PoolManager.h:38
◆ g_IsNewRequestForAllocationReceived
BOOLEAN g_IsNewRequestForAllocationReceived |
We set it when there is a new allocation.
◆ g_IsNewRequestForDeAllocation
BOOLEAN g_IsNewRequestForDeAllocation |
We set it when there is a new allocation.
◆ g_ListOfAllocatedPoolsHead
LIST_ENTRY g_ListOfAllocatedPoolsHead |
Create a list from all pools.
◆ g_RequestNewAllocation
If sb wants allocation from vmx root, adds it's request to this structure.
◆ LockForReadingPool
volatile LONG LockForReadingPool |
Spinlock for reading pool.
◆ LockForRequestAllocation
volatile LONG LockForRequestAllocation |
Request allocation Spinlock.