HyperDbg Debugger
|
The pool manager used in vmx root. More...
#include "pch.h"
Functions | |
BOOLEAN | PlmgrAllocateRequestNewAllocation (SIZE_T NumberOfBytes) |
Allocate global requesting variable. | |
VOID | PlmgrFreeRequestNewAllocation (VOID) |
BOOLEAN | PoolManagerInitialize () |
Initializes the pool manager. | |
VOID | PoolManagerUninitialize () |
Uninitialize the pool manager (free the buffers, etc.) | |
BOOLEAN | PoolManagerFreePool (UINT64 AddressToFree) |
This function set a pool flag to be freed, and it will be freed on the next IOCTL when it's safe to remove. | |
VOID | PoolManagerShowPreAllocatedPools () |
Shows list of pre-allocated pools available (used for debugging purposes) | |
UINT64 | PoolManagerRequestPool (POOL_ALLOCATION_INTENTION Intention, BOOLEAN RequestNewPool, UINT32 Size) |
This function should be called from vmx-root in order to get a pool from the list. | |
BOOLEAN | PoolManagerAllocateAndAddToPoolTable (SIZE_T Size, UINT32 Count, POOL_ALLOCATION_INTENTION Intention) |
Allocate the new pools and add them to pool table. | |
BOOLEAN | PoolManagerCheckAndPerformAllocationAndDeallocation () |
This function performs allocations from VMX non-root based on g_RequestNewAllocation. | |
BOOLEAN | PoolManagerRequestAllocation (SIZE_T Size, UINT32 Count, POOL_ALLOCATION_INTENTION Intention) |
Request to allocate new buffers. | |
The pool manager used in vmx root.
As we cannot allocate pools in vmx root, we need a pool manager to manage the pools
BOOLEAN PlmgrAllocateRequestNewAllocation | ( | SIZE_T | NumberOfBytes | ) |
Allocate global requesting variable.
NumberOfBytes |
BOOLEAN PoolManagerAllocateAndAddToPoolTable | ( | SIZE_T | Size, |
UINT32 | Count, | ||
POOL_ALLOCATION_INTENTION | Intention ) |
Allocate the new pools and add them to pool table.
This function doesn't need lock as it just calls once from PASSIVE_LEVEL
Size | Size of each chunk |
Count | Count of chunks |
Intention | The Intention of the buffer (buffer tag) |
BOOLEAN PoolManagerCheckAndPerformAllocationAndDeallocation | ( | ) |
This function performs allocations from VMX non-root based on g_RequestNewAllocation.
This function set a pool flag to be freed, and it will be freed on the next IOCTL when it's safe to remove.
AddressToFree | The pool address that was previously obtained from the pool manager |
BOOLEAN PoolManagerInitialize | ( | ) |
Initializes the pool manager.
Initializes the Pool Manager and pre-allocate some pools.
BOOLEAN PoolManagerRequestAllocation | ( | SIZE_T | Size, |
UINT32 | Count, | ||
POOL_ALLOCATION_INTENTION | Intention ) |
Request to allocate new buffers.
Size | Request new buffer to allocate |
Count | Count of chunks |
Intention | The intention of chunks (buffer tag) |
UINT64 PoolManagerRequestPool | ( | POOL_ALLOCATION_INTENTION | Intention, |
BOOLEAN | RequestNewPool, | ||
UINT32 | Size ) |
This function should be called from vmx-root in order to get a pool from the list.
If RequestNewPool is TRUE then Size is used, otherwise Size is useless Note : Most of the times this function called from vmx root but not all the time
Intention | The intention why we need this pool for (buffer tag) |
RequestNewPool | Create a request to allocate a new pool with the same size, next time that it's safe to allocate (this way we never ran out of pools for this "Intention") |
Size | If the RequestNewPool is true the we should specify a size for the new pool |
VOID PoolManagerShowPreAllocatedPools | ( | ) |
Shows list of pre-allocated pools available (used for debugging purposes)
VOID PoolManagerUninitialize | ( | ) |
Uninitialize the pool manager (free the buffers, etc.)
De-allocate all the allocated pools.