Author: tkreuzer
Date: Fri Sep 23 22:24:11 2011
New Revision: 53819
URL:
http://svn.reactos.org/svn/reactos?rev=53819&view=rev
Log:
[NTOSKRNL]
Converting MmLargeStackSize from registry setting to byte value is portable code, move it
out of MiInitMachineDependent
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c
trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Fri Sep 23 22:24:11 2011
@@ -163,28 +163,6 @@
PMMPFN Pfn1;
ULONG Flags;
- /* Check for kernel stack size that's too big */
- if (MmLargeStackSize > (KERNEL_LARGE_STACK_SIZE / _1KB))
- {
- /* Sanitize to default value */
- MmLargeStackSize = KERNEL_LARGE_STACK_SIZE;
- }
- else
- {
- /* Take the registry setting, and convert it into bytes */
- MmLargeStackSize *= _1KB;
-
- /* Now align it to a page boundary */
- MmLargeStackSize = PAGE_ROUND_UP(MmLargeStackSize);
-
- /* Sanity checks */
- ASSERT(MmLargeStackSize <= KERNEL_LARGE_STACK_SIZE);
- ASSERT((MmLargeStackSize & (PAGE_SIZE - 1)) == 0);
-
- /* Make sure it's not too low */
- if (MmLargeStackSize < KERNEL_STACK_SIZE) MmLargeStackSize =
KERNEL_STACK_SIZE;
- }
-
/* Check for global bit */
#if 0
if (KeFeatureBits & KF_GLOBAL_PAGE)
Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Fri Sep 23 22:24:11 2011
@@ -2038,6 +2038,28 @@
MI_MIN_ALLOCATION_FRAGMENT);
}
+ /* Check for kernel stack size that's too big */
+ if (MmLargeStackSize > (KERNEL_LARGE_STACK_SIZE / _1KB))
+ {
+ /* Sanitize to default value */
+ MmLargeStackSize = KERNEL_LARGE_STACK_SIZE;
+ }
+ else
+ {
+ /* Take the registry setting, and convert it into bytes */
+ MmLargeStackSize *= _1KB;
+
+ /* Now align it to a page boundary */
+ MmLargeStackSize = PAGE_ROUND_UP(MmLargeStackSize);
+
+ /* Sanity checks */
+ ASSERT(MmLargeStackSize <= KERNEL_LARGE_STACK_SIZE);
+ ASSERT((MmLargeStackSize & (PAGE_SIZE - 1)) == 0);
+
+ /* Make sure it's not too low */
+ if (MmLargeStackSize < KERNEL_STACK_SIZE) MmLargeStackSize =
KERNEL_STACK_SIZE;
+ }
+
/* Initialize the platform-specific parts */
MiInitMachineDependent(LoaderBlock);