VirtualBox

Changeset 17539 in vbox


Ignore:
Timestamp:
Mar 8, 2009 5:34:39 AM (16 years ago)
Author:
vboxsync
Message:

ConsoleImpl2.cpp: Prep for lots of ram.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r17275 r17539  
    180180    ULONG cRamMBs;
    181181    hrc = pMachine->COMGETTER(MemorySize)(&cRamMBs);                                H();
     182#if 0 /* enable to play with lots of memory. */
     183    cRamMBs = 8 * 1024;
     184#endif
     185    uint64_t const cbRam = cRamMBs * (uint64_t)_1M;
    182186
    183187    ULONG cCpus = 1;
     
    201205    STR_FREE();
    202206    rc = CFGMR3InsertBytes(pRoot,   "UUID", pUuid, sizeof(*pUuid));                 RC_CHECK();
    203     rc = CFGMR3InsertInteger(pRoot, "RamSize",              cRamMBs * _1M);         RC_CHECK();
     207    rc = CFGMR3InsertInteger(pRoot, "RamSize",              cbRam);                 RC_CHECK();
    204208    rc = CFGMR3InsertInteger(pRoot, "NumCPUs",              cCpus);                 RC_CHECK();
    205209    rc = CFGMR3InsertInteger(pRoot, "TimerMillies",         10);                    RC_CHECK();
     
    362366        rc = CFGMR3InsertInteger(pInst, "Trusted",              1);     /* boolean */   RC_CHECK();
    363367        rc = CFGMR3InsertNode(pInst,    "Config", &pBiosCfg);                           RC_CHECK();
    364         rc = CFGMR3InsertInteger(pBiosCfg,  "RamSize",              cRamMBs * _1M);     RC_CHECK();
     368        rc = CFGMR3InsertInteger(pBiosCfg,  "RamSize",              cbRam);             RC_CHECK();
    365369        rc = CFGMR3InsertInteger(pBiosCfg,  "NumCPUs",              cCpus);             RC_CHECK();
    366370        rc = CFGMR3InsertString(pBiosCfg,   "HardDiskDevice",       "piix3ide");        RC_CHECK();
     
    626630        rc = CFGMR3InsertInteger(pInst, "Trusted", 1);              /* boolean */   RC_CHECK();
    627631        rc = CFGMR3InsertNode(pInst,    "Config", &pCfg);                           RC_CHECK();
    628         rc = CFGMR3InsertInteger(pCfg,  "RamSize",          cRamMBs * _1M);         RC_CHECK();
     632        rc = CFGMR3InsertInteger(pCfg,  "RamSize",          cbRam);                 RC_CHECK();
    629633        rc = CFGMR3InsertInteger(pCfg,  "NumCPUs",          cCpus);                 RC_CHECK();
    630634
     
    707711    rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo",        0);                     RC_CHECK();
    708712    rc = CFGMR3InsertNode(pInst,    "Config", &pCfg);                               RC_CHECK();
    709     hrc = pMachine->COMGETTER(VRAMSize)(&cRamMBs);                                  H();
    710     rc = CFGMR3InsertInteger(pCfg,  "VRamSize",             cRamMBs * _1M);         RC_CHECK();
     713    ULONG cVRamMBs;
     714    hrc = pMachine->COMGETTER(VRAMSize)(&cVRamMBs);                                 H();
     715    rc = CFGMR3InsertInteger(pCfg,  "VRamSize",             cVRamMBs * _1M);        RC_CHECK();
    711716#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE /* not safe here yet. */
    712717    rc = CFGMR3InsertInteger(pCfg,  "R0Enabled",            fHWVirtExEnabled);      RC_CHECK();
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