VirtualBox

Changeset 2831 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 23, 2007 8:17:18 PM (18 years ago)
Author:
vboxsync
Message:

FE/BFE: added '-prealloc' option to force RAM preallocation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp

    r2792 r2831  
    173173static uint32_t vramSize = 4;
    174174#ifdef VBOXSDL_ADVANCED_OPTIONS
    175 static unsigned fRawR0 = ~0U;
    176 static unsigned fRawR3 = ~0U;
    177 static unsigned fPATM  = ~0U;
    178 static unsigned fCSAM  = ~0U;
    179 #endif
     175static bool g_fRawR0 = true;
     176static bool g_fRawR3 = true;
     177static bool g_fPATM  = true;
     178static bool g_fCSAM  = true;
     179#endif
     180static bool g_fPreAllocRam = false;
    180181static bool g_fReleaseLog = true; /**< Set if we should open the release. */
    181182
     
    287288             "  -m <size>          Set memory size in megabytes (default 128MB)\n"
    288289             "  -vram <size>       Set size of video memory in megabytes\n"
     290             "  -prealloc          Force RAM pre-allocation\n"
    289291             "  -fullscreen        Start VM in fullscreen mode\n"
    290292             "  -nofstoggle        Forbid switching to/from fullscreen mode\n"
     
    587589        else if (strcmp(pszArg, "-norellog") == 0)
    588590            g_fReleaseLog = false;
     591        else if (strcmp(pszArg, "-prealloc") == 0)
     592            g_fPreAllocRam = true;
    589593#ifdef VBOXSDL_ADVANCED_OPTIONS
    590594        else if (strcmp(pszArg, "-rawr0") == 0)
    591             fRawR0 = true;
     595            g_fRawR0 = true;
    592596        else if (strcmp(pszArg, "-norawr0") == 0)
    593             fRawR0 = false;
     597            g_fRawR0 = false;
    594598        else if (strcmp(pszArg, "-rawr3") == 0)
    595             fRawR3 = true;
     599            g_fRawR3 = true;
    596600        else if (strcmp(pszArg, "-norawr3") == 0)
    597             fRawR3 = false;
     601            g_fRawR3 = false;
    598602        else if (strcmp(pszArg, "-patm") == 0)
    599             fPATM = true;
     603            g_fPATM = true;
    600604        else if (strcmp(pszArg, "-nopatm") == 0)
    601             fPATM = false;
     605            g_fPATM = false;
    602606        else if (strcmp(pszArg, "-csam") == 0)
    603             fCSAM = true;
     607            g_fCSAM = true;
    604608        else if (strcmp(pszArg, "-nocsam") == 0)
    605             fCSAM = false;
     609            g_fCSAM = false;
    606610#endif /* VBOXSDL_ADVANCED_OPTIONS */
    607611#ifdef __L4__
     
    10511055    rc = CFGMR3InsertInteger(pRoot, "RamSize",              memorySize * _1M);
    10521056    UPDATERC();
     1057    if (g_fPreAllocRam)
     1058    {
     1059        rc = CFGMR3InsertInteger(pRoot, "PreAllocRam",      1);
     1060        UPDATERC();
     1061    }
    10531062    rc = CFGMR3InsertInteger(pRoot, "TimerMillies",         10);
    10541063    UPDATERC();
    10551064#ifdef VBOXSDL_ADVANCED_OPTIONS
    1056     rc = CFGMR3InsertInteger(pRoot, "RawR3Enabled",         (fRawR3 != ~0U) ? fRawR3 : 1);
    1057     UPDATERC();
    1058     rc = CFGMR3InsertInteger(pRoot, "RawR0Enabled",         (fRawR0 != ~0U) ? fRawR0 : 1);
    1059     UPDATERC();
    1060     rc = CFGMR3InsertInteger(pRoot, "PATMEnabled",          (fPATM != ~0U) ? fPATM : 1);
    1061     UPDATERC();
    1062     rc = CFGMR3InsertInteger(pRoot, "CSAMEnabled",          (fCSAM != ~0U) ? fCSAM : 1);
     1065    rc = CFGMR3InsertInteger(pRoot, "RawR3Enabled",         g_fRawR3);
     1066    UPDATERC();
     1067    rc = CFGMR3InsertInteger(pRoot, "RawR0Enabled",         g_fRawR0);
     1068    UPDATERC();
     1069    rc = CFGMR3InsertInteger(pRoot, "PATMEnabled",          g_fPATM);
     1070    UPDATERC();
     1071    rc = CFGMR3InsertInteger(pRoot, "CSAMEnabled",          g_fCSAM);
    10631072#else
    10641073    rc = CFGMR3InsertInteger(pRoot, "RawR3Enabled",         1);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette