Menu

#45 Memory size check is excessively restrictive

Unstable (GIT)
closed-fixed
nobody
None
5
2016-05-31
2013-12-20
Ben Nemec
No

It is not possible to create a VM with a memory size of 8 GB or greater. This is because of an overly restrictive size check in Set_Memory_Size in VM.cpp. The following diff fixes the problem for me:

diff --git a/VM.cpp b/VM.cpp
index 04c6173..66525ed 100644
--- a/VM.cpp
+++ b/VM.cpp
@@ -7578,7 +7578,7 @@ int Virtual_Machine::Get_Memory_Size() const

 void Virtual_Machine::Set_Memory_Size( int megs )
 {
-       if( megs > 0 && megs <= 6144 ) Memory_Size = megs;
+       if( megs > 0 && megs <= 32768 ) Memory_Size = megs;
        else
        {
                AQError( "void Virtual_Machine::Set_Memory_Size( int megs )",

Discussion

  • Tobias Gläßer

    Tobias Gläßer - 2016-05-31
    • status: open --> open-accepted
     
  • Tobias Gläßer

    Tobias Gläßer - 2016-05-31

    Fixed in latest git master. I removed the limit entirely.

     
  • Tobias Gläßer

    Tobias Gläßer - 2016-05-31
    • status: open-accepted --> closed-fixed
     
  • Tobias Gläßer

    Tobias Gläßer - 2016-05-31

    And thanks for reporting by the way.

     

Log in to post a comment.

MongoDB Logo MongoDB