- Now that we actually take the trouble to set up MmLargeStackSize properly, use it! Also make it possible to set via the registry by adding it to the control vector table.

svn path=/trunk/; revision=68964
This commit is contained in:
Stefan Ginsberg 2015-09-03 20:04:28 +00:00
parent cfea1726c5
commit 7c209f0f0f
2 changed files with 6 additions and 6 deletions

View file

@ -341,7 +341,7 @@ INIT_FUNCTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
{
L"Session Manager\\Memory Management",
L"LargeStackSize",
&DummyData,
&MmLargeStackSize,
NULL,
NULL
},

View file

@ -200,7 +200,7 @@ MmDeleteKernelStack(IN PVOID StackBase,
// Calculate pages used
//
StackPages = BYTES_TO_PAGES(GuiStack ?
KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE);
MmLargeStackSize : KERNEL_STACK_SIZE);
/* Acquire the PFN lock */
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
@ -275,7 +275,7 @@ MmCreateKernelStack(IN BOOLEAN GuiStack,
//
// We'll allocate 64KB stack, but only commit 12K
//
StackPtes = BYTES_TO_PAGES(KERNEL_LARGE_STACK_SIZE);
StackPtes = BYTES_TO_PAGES(MmLargeStackSize);
StackPages = BYTES_TO_PAGES(KERNEL_LARGE_STACK_COMMIT);
}
else
@ -317,7 +317,7 @@ MmCreateKernelStack(IN BOOLEAN GuiStack,
// Select the right PTE address where we actually start committing pages
//
PointerPte = StackPte;
if (GuiStack) PointerPte += BYTES_TO_PAGES(KERNEL_LARGE_STACK_SIZE -
if (GuiStack) PointerPte += BYTES_TO_PAGES(MmLargeStackSize -
KERNEL_LARGE_STACK_COMMIT);
@ -382,7 +382,7 @@ MmGrowKernelStackEx(IN PVOID StackPointer,
// Make sure the stack did not overflow
//
ASSERT(((ULONG_PTR)Thread->StackBase - (ULONG_PTR)Thread->StackLimit) <=
(KERNEL_LARGE_STACK_SIZE + PAGE_SIZE));
(MmLargeStackSize + PAGE_SIZE));
//
// Get the current stack limit
@ -400,7 +400,7 @@ MmGrowKernelStackEx(IN PVOID StackPointer,
// Now make sure you're not going past the reserved space
//
LastPte = MiAddressToPte((PVOID)((ULONG_PTR)Thread->StackBase -
KERNEL_LARGE_STACK_SIZE));
MmLargeStackSize));
if (NewLimitPte < LastPte)
{
//