This function performs allocations from VMX non-root based on g_RequestNewAllocation.
321{
323
324
325
326
327
329 {
330
331
332
333
335 }
336
337
338
339
340 PAGED_CODE();
341
343
344
345
346
348 {
350 {
352
353 if (CurrentItem->
Size != 0)
354 {
358
359
360
361
362 CurrentItem->
Count = 0;
364 CurrentItem->
Size = 0;
365 }
366 }
367 }
368
369
370
371
373 {
375
377 {
378 PLIST_ENTRY Next = Link->Flink;
379
380
381
382
384
385
386
387
388
390 {
391
392
393
395
396
397
398
400
401
402
403
404 RemoveEntryList(Link);
405
406
407
408
410 }
411
412 Link = Next;
413 }
414 }
415
416
417
418
421
423
424 return Result;
425}
BOOLEAN PoolManagerAllocateAndAddToPoolTable(SIZE_T Size, UINT32 Count, POOL_ALLOCATION_INTENTION Intention)
Allocate the new pools and add them to pool table.
Definition PoolManager.c:271
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
#define MaximumRequestsQueueDepth
Maximum Pool Requests (while not allocated).
Definition PoolManager.h:22
BOOLEAN g_IsNewRequestForAllocationReceived
We set it when there is a new allocation.
Definition PoolManager.h:89
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:95
LIST_ENTRY g_ListOfAllocatedPoolsHead
Create a list from all pools.
Definition PoolManager.h:101
BOOLEAN g_PoolManagerInitialized
Pool manager memory allocator initialized.
Definition PoolManager.h:83
VOID SpinlockLock(volatile LONG *Lock)
Tries to get the lock and won't return until successfully get the lock.
Definition Spinlock.c:53
VOID SpinlockUnlock(volatile LONG *Lock)
Release the lock.
Definition Spinlock.c:162
IMPORT_EXPORT_VMM BOOLEAN VmFuncVmxGetCurrentExecutionMode()
Get the current VMX operation state.
Definition Export.c:802
#define CONTAINING_RECORD(address, type, field)
Definition nt-list.h:36
UINT64 Address
Definition PoolManager.h:35
BOOLEAN ShouldBeFreed
Definition PoolManager.h:40
BOOLEAN AlreadyFreed
Definition PoolManager.h:41
UINT32 Count
Definition PoolManager.h:52
SIZE_T Size
Definition PoolManager.h:51
POOL_ALLOCATION_INTENTION Intention
Definition PoolManager.h:53