VirtualBox

Changeset 30842 in vbox


Ignore:
Timestamp:
Jul 14, 2010 2:19:44 PM (14 years ago)
Author:
vboxsync
Message:

Activated large guest memory support for 32-bit guests

Location:
trunk/src/VBox
Files:
4 edited

Legend:

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

    r30825 r30842  
    49814981        RTLogRelLogger(loggerRelease, 0, ~0U, "Host RAM: %uMB RAM, available: %uMB\n",
    49824982                       cMbHostRam, cMbHostRamAvail);
    4983 
    4984 #if defined(RT_OS_WINDOWS) && HC_ARCH_BITS == 32
    4985         /* @todo move this in RT, but too lazy now */
    4986         uint32_t maxRAMArch;
    4987         SYSTEM_INFO sysInfo;
    4988         GetSystemInfo(&sysInfo);
    4989 
    4990         if (sysInfo.lpMaximumApplicationAddress >= (LPVOID)0xC0000000)   /* 3.0 GB */
    4991             maxRAMArch = UINT32_C(2560);
    4992         else
    4993         if (sysInfo.lpMaximumApplicationAddress > (LPVOID)0xA0000000)    /* 2.5 GB */
    4994             maxRAMArch = UINT32_C(2048);
    4995         else
    4996             maxRAMArch = UINT32_C(1500);
    4997 
    4998         RTLogRelLogger(loggerRelease, 0, ~0U, "Maximum user application address: 0x%p\n", sysInfo.lpMaximumApplicationAddress);
    4999         RTLogRelLogger(loggerRelease, 0, ~0U, "Maximum allowed guest RAM size:   %dMB\n", maxRAMArch);
    5000 #endif
    50014983
    50024984        /* the package type is interesting for Linux distributions */
  • trunk/src/VBox/Main/SystemPropertiesImpl.cpp

    r30764 r30842  
    204204    ULONG maxRAMSys = MM_RAM_MAX_IN_MB;
    205205    ULONG maxRAMArch = maxRAMSys;
    206 #if HC_ARCH_BITS == 32 && !defined(RT_OS_DARWIN)
    207 # ifdef RT_OS_WINDOWS
    208     SYSTEM_INFO sysInfo;
    209     GetSystemInfo(&sysInfo);
    210 
    211     if (sysInfo.lpMaximumApplicationAddress >= (LPVOID)0xC0000000)   /* 3.0 GB */
    212         maxRAMArch = UINT32_C(2560);
    213     else
    214     if (sysInfo.lpMaximumApplicationAddress > (LPVOID)0xA0000000)    /* 2.5 GB */
    215         maxRAMArch = UINT32_C(2048);
    216     else
    217         maxRAMArch = UINT32_C(1500);
    218 # else
    219     maxRAMArch = UINT32_C(2560);
    220 # endif
    221 #endif
    222206    *maxRAM = RT_MIN(maxRAMSys, maxRAMArch);
    223207
  • trunk/src/VBox/VMM/PGMInternal.h

    r30840 r30842  
    8888#if (HC_ARCH_BITS == 64) && !defined(IN_RC)
    8989# define PGM_WITH_LARGE_PAGES
     90#endif
     91
     92/**
     93 * Chunk unmapping code activated on 32-bit hosts for > 1.5/2 GB guest memory support
     94 */
     95#if (HC_ARCH_BITS == 32) && !defined(RT_OS_DARWIN)
     96# define PGM_WITH_LARGE_ADDRESS_SPACE_ON_32_BIT_HOST
    9097#endif
    9198
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r30841 r30842  
    31883188}
    31893189
    3190 #ifdef VBOX_WITH_LARGE_ADDRESS_SPACE_ON_32_BIT_HOST
     3190#ifdef PGM_WITH_LARGE_ADDRESS_SPACE_ON_32_BIT_HOST
    31913191/**
    31923192 * Tree enumeration callback for dealing with age rollover.
     
    34293429    AssertRC(rc);
    34303430}
    3431 #endif /* VBOX_WITH_LARGE_ADDRESS_SPACE_ON_32_BIT_HOST */
     3431#endif /* PGM_WITH_LARGE_ADDRESS_SPACE_ON_32_BIT_HOST */
    34323432
    34333433/**
     
    34883488        if (pVM->pgm.s.ChunkR3Map.c >= pVM->pgm.s.ChunkR3Map.cMax)
    34893489        {
    3490 #ifdef VBOX_WITH_LARGE_ADDRESS_SPACE_ON_32_BIT_HOST
     3490#ifdef PGM_WITH_LARGE_ADDRESS_SPACE_ON_32_BIT_HOST
    34913491            /* Postpone the unmap operation (which requires a rendezvous operation) as we own the PGM lock here. */
    34923492            rc = VMR3ReqCallNoWaitU(pVM->pUVM, VMCPUID_ANY, (PFNRT)pgmR3PhysUnmapChunk, 1, pVM);
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