mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:45:46 +00:00
[SMSS]
Limit the size of swapfile (to 2GiB). Bug #4760. svn path=/trunk/; revision=54411
This commit is contained in:
parent
6dd897228b
commit
e4382eb7d6
1 changed files with 12 additions and 0 deletions
|
@ -196,6 +196,12 @@ SmpPagingFilesQueryRoutine(PWSTR ValueName,
|
|||
|
||||
}
|
||||
|
||||
/* 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 @@ SmpCreateDefaultPagingFile(VOID)
|
|||
}
|
||||
}
|
||||
|
||||
/* 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue