Author: dgorbachev
Date: Thu Nov 17 20:22:16 2011
New Revision: 54411
URL:
http://svn.reactos.org/svn/reactos?rev=54411&view=rev
Log:
[SMSS]
Limit the size of swapfile (to 2GiB). Bug #4760.
Modified:
trunk/reactos/base/system/smss/initpage.c
Modified: trunk/reactos/base/system/smss/initpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initpage.…
==============================================================================
--- trunk/reactos/base/system/smss/initpage.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initpage.c [iso-8859-1] Thu Nov 17 20:22:16 2011
@@ -196,6 +196,12 @@
}
+ /* FIXME */
+ if (InitialSize.QuadPart > (ULONGLONG)GIGABYTE * 2)
+ InitialSize.QuadPart = (ULONGLONG)GIGABYTE * 2;
+ if (MaximumSize.QuadPart > (ULONGLONG)GIGABYTE * 2)
+ MaximumSize.QuadPart = (ULONGLONG)GIGABYTE * 2;
+
/* Make sure that max is not smaller then initial */
if (InitialSize.QuadPart > MaximumSize.QuadPart)
{
@@ -457,6 +463,12 @@
}
}
+ /* FIXME */
+ if (InitialSizeInMB.QuadPart > 2048)
+ InitialSizeInMB.QuadPart = 2048;
+ if (MaximumSizeInMB.QuadPart > 2048)
+ MaximumSizeInMB.QuadPart = 2048;
+
DPRINT("InitialSize %I64u MB MaximumSize %I64u MB\n",
InitialSizeInMB.QuadPart,
MaximumSizeInMB.QuadPart);