[PC-BSD Commits] r12267 - pcbsd/current/src-qt4/pc-sysinstaller

svn at pcbsd.org svn at pcbsd.org
Wed Aug 24 12:59:18 PDT 2011


Author: kris
Date: 2011-08-24 12:59:18 -0700 (Wed, 24 Aug 2011)
New Revision: 12267

Modified:
   pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp
Log:

Add some basic sanity checks for the upper sizes of swap space



Modified: pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp	2011-08-24 19:19:51 UTC (rev 12266)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp	2011-08-24 19:59:18 UTC (rev 12267)
@@ -453,6 +453,15 @@
        mntsize = systemMemory * 2;
        if ( totalSize - mntsize < 3000 )
           mntsize = 512;
+
+       // Cap the swap size on desktop
+       if ( radioInstallPCBSD->isChecked() && mntsize > 4000 )
+          mntsize = 4000;
+
+       // Cap the swap size on servers
+       if ( ! radioInstallPCBSD->isChecked() && mntsize > 8000 )
+          mntsize = 8000;
+
        fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(mntsize) << "" << "";
        totalSize = totalSize - mntsize;
        //qDebug() << "Auto-Gen FS:" <<  fileSystem;



More information about the Commits mailing list