mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOS:MM] Fail allocating non-paged pool when running out of available pages
This commit is contained in:
parent
34630a06ca
commit
54354712e2
1 changed files with 13 additions and 0 deletions
|
@ -849,6 +849,19 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType,
|
|||
//
|
||||
MiAcquirePfnLockAtDpcLevel();
|
||||
|
||||
/* Check that we have enough available pages for this request */
|
||||
if (MmAvailablePages < SizeInPages)
|
||||
{
|
||||
MiReleasePfnLockFromDpcLevel();
|
||||
KeReleaseQueuedSpinLock(LockQueueMmNonPagedPoolLock, OldIrql);
|
||||
|
||||
MiReleaseSystemPtes(StartPte, SizeInPages, NonPagedPoolExpansion);
|
||||
|
||||
DPRINT1("OUT OF AVAILABLE PAGES! Required %lu, Available %lu\n", SizeInPages, MmAvailablePages);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Loop the pages
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue