mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 11:47:36 +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();
|
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
|
// Loop the pages
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue