VirtualBox

Changeset 18263 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 25, 2009 4:26:37 PM (16 years ago)
Author:
vboxsync
Message:

Main,VBox/param.h: Move the hard RAM limit out of the schema.

Location:
trunk/src/VBox/Main
Files:
10 edited

Legend:

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

    r18248 r18263  
    2121 */
    2222
     23#include <VBox/param.h>
    2324#include <iprt/stream.h>
    2425#include <iprt/path.h>
     
    12981299            /* Check for the constrains */
    12991300            if (ullMemSizeVBox != 0 &&
    1300                 (ullMemSizeVBox < static_cast<uint64_t>(SchemaDefs::MinGuestRAM) ||
    1301                  ullMemSizeVBox > static_cast<uint64_t>(SchemaDefs::MaxGuestRAM)))
     1301                (ullMemSizeVBox < MM_RAM_MIN_IN_MB ||
     1302                 ullMemSizeVBox > MM_RAM_MAX_IN_MB))
    13021303            {
    13031304                addWarning(tr("The virtual system \"%s\" claims support for %llu MB RAM size, but VirtualBox has support for min %u & max %u MB RAM size only."),
    1304                               vsysThis.strName.c_str(), ullMemSizeVBox, SchemaDefs::MinGuestRAM, SchemaDefs::MaxGuestRAM);
    1305                 ullMemSizeVBox = RT_MIN(RT_MAX(ullMemSizeVBox, static_cast<uint64_t>(SchemaDefs::MinGuestRAM)), static_cast<uint64_t>(SchemaDefs::MaxGuestRAM));
     1305                              vsysThis.strName.c_str(), ullMemSizeVBox, MM_RAM_MIN_IN_MB, MM_RAM_MAX_IN_MB);
     1306                ullMemSizeVBox = RT_MIN(RT_MAX(ullMemSizeVBox, MM_RAM_MIN_IN_MB), MM_RAM_MAX_IN_MB);
    13061307            }
    13071308            if (vsysThis.ullMemorySize == 0)
  • trunk/src/VBox/Main/MachineImpl.cpp

    r18252 r18263  
    983983{
    984984    /* check RAM limits */
    985     if (memorySize < SchemaDefs::MinGuestRAM ||
    986         memorySize > SchemaDefs::MaxGuestRAM)
     985    if (memorySize < MM_RAM_MIN_IN_MB ||
     986        memorySize > MM_RAM_MAX_IN_MB)
    987987        return setError (E_INVALIDARG,
    988988            tr ("Invalid RAM size: %lu MB (must be in range [%lu, %lu] MB)"),
    989                 memorySize, SchemaDefs::MinGuestRAM, SchemaDefs::MaxGuestRAM);
     989                memorySize, MM_RAM_MIN_IN_MB, MM_RAM_MAX_IN_MB);
    990990
    991991    AutoCaller autoCaller (this);
  • trunk/src/VBox/Main/SystemPropertiesImpl.cpp

    r16569 r18263  
    149149
    150150    /* no need to lock, this is const */
    151     *minRAM = SchemaDefs::MinGuestRAM;
     151    AssertCompile(MM_RAM_MIN_IN_MB >= SchemaDefs::MinGuestRAM);
     152    *minRAM = MM_RAM_MIN_IN_MB;
    152153
    153154    return S_OK;
     
    163164
    164165    /* no need to lock, this is const */
    165     *maxRAM = SchemaDefs::MaxGuestRAM;
     166    AssertCompile(MM_RAM_MAX_IN_MB <= SchemaDefs::MaxGuestRAM);
     167    *maxRAM = MM_RAM_MAX_IN_MB;
    166168
    167169    return S_OK;
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r18023 r18263  
    777777</xsd:complexType>
    778778
     779<xsd:complexType name="TMemory">
     780  <xsd:attribute name="RAMSize" use="required">
     781    <xsd:simpleType>
     782      <xsd:restriction base="xsd:unsignedInt">
     783        <xsd:minInclusive value="4"/>
     784        <xsd:maxInclusive value="16384"/>
     785      </xsd:restriction>
     786    </xsd:simpleType>
     787  </xsd:attribute>
     788</xsd:complexType>
     789
    779790<xsd:complexType name="THardware">
    780791  <xsd:all>
  • trunk/src/VBox/Main/xml/VirtualBox-settings-freebsd.xsd

    r15708 r18263  
    5555-->
    5656
    57 <xsd:complexType name="TMemory">
    58   <xsd:attribute name="RAMSize" use="required">
    59     <xsd:simpleType>
    60       <xsd:restriction base="xsd:unsignedInt">
    61         <xsd:minInclusive value="4"/>
    62         <xsd:maxInclusive value="3584"/>
    63       </xsd:restriction>
    64     </xsd:simpleType>
    65   </xsd:attribute>
    66 </xsd:complexType>
    67 
    6857<xsd:complexType name="TAudioAdapter">
    6958  <xsd:complexContent>
  • trunk/src/VBox/Main/xml/VirtualBox-settings-linux.xsd

    r15708 r18263  
    5555-->
    5656
    57 <xsd:complexType name="TMemory">
    58   <xsd:attribute name="RAMSize" use="required">
    59     <xsd:simpleType>
    60       <xsd:restriction base="xsd:unsignedInt">
    61         <xsd:minInclusive value="4"/>
    62         <xsd:maxInclusive value="3584"/>
    63       </xsd:restriction>
    64     </xsd:simpleType>
    65   </xsd:attribute>
    66 </xsd:complexType>
    67 
    6857<xsd:complexType name="TAudioAdapter">
    6958  <xsd:complexContent>
  • trunk/src/VBox/Main/xml/VirtualBox-settings-macosx.xsd

    r15708 r18263  
    5555-->
    5656
    57 <xsd:complexType name="TMemory">
    58   <xsd:attribute name="RAMSize" use="required">
    59     <xsd:simpleType>
    60       <xsd:restriction base="xsd:unsignedInt">
    61         <xsd:minInclusive value="4"/>
    62         <xsd:maxInclusive value="3584"/>
    63       </xsd:restriction>
    64     </xsd:simpleType>
    65   </xsd:attribute>
    66 </xsd:complexType>
    67 
    6857<xsd:complexType name="TAudioAdapter">
    6958  <xsd:complexContent>
  • trunk/src/VBox/Main/xml/VirtualBox-settings-os2.xsd

    r15708 r18263  
    5656-->
    5757
    58 <xsd:complexType name="TMemory">
    59   <xsd:attribute name="RAMSize" use="required">
    60     <xsd:simpleType>
    61       <xsd:restriction base="xsd:unsignedInt">
    62         <xsd:minInclusive value="4"/>
    63         <xsd:maxInclusive value="3584"/>
    64       </xsd:restriction>
    65     </xsd:simpleType>
    66   </xsd:attribute>
    67 </xsd:complexType>
    68 
    6958<xsd:complexType name="TAudioAdapter">
    7059  <xsd:complexContent>
  • trunk/src/VBox/Main/xml/VirtualBox-settings-solaris.xsd

    r15708 r18263  
    5555-->
    5656
    57 <xsd:complexType name="TMemory">
    58   <xsd:attribute name="RAMSize" use="required">
    59     <xsd:simpleType>
    60       <xsd:restriction base="xsd:unsignedInt">
    61         <xsd:minInclusive value="4"/>
    62         <xsd:maxInclusive value="3584"/>
    63       </xsd:restriction>
    64     </xsd:simpleType>
    65   </xsd:attribute>
    66 </xsd:complexType>
    67 
    6857<xsd:complexType name="TAudioAdapter">
    6958  <xsd:complexContent>
  • trunk/src/VBox/Main/xml/VirtualBox-settings-windows.xsd

    r15708 r18263  
    5555-->
    5656
    57 <xsd:complexType name="TMemory">
    58   <xsd:attribute name="RAMSize" use="required">
    59     <xsd:simpleType>
    60       <xsd:restriction base="xsd:unsignedInt">
    61         <xsd:minInclusive value="4"/>
    62         <xsd:maxInclusive value="3584"/>
    63       </xsd:restriction>
    64     </xsd:simpleType>
    65   </xsd:attribute>
    66 </xsd:complexType>
    67 
    6857<xsd:complexType name="TAudioAdapter">
    6958  <xsd:complexContent>
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