VirtualBox

Changeset 20615 in vbox for trunk/src/VBox/VMM/testcase


Ignore:
Timestamp:
Jun 16, 2009 9:37:47 AM (15 years ago)
Author:
vboxsync
Message:

fixed tstMMHyperHeap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp

    r13818 r20615  
    3838#include <iprt/string.h>
    3939
     40/* does not work for more CPUs as SUPLowAlloc() would refuse to allocate more pages */
     41#define NUM_CPUS  16
     42
    4043
    4144int main(int argc, char **argv)
     
    5255    PVM         pVM;
    5356    RTR0PTR     pvR0;
    54     SUPPAGE     aPages[RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT];
     57    SUPPAGE     aPages[RT_ALIGN_Z(sizeof(*pVM) + NUM_CPUS*sizeof (VMCPU), PAGE_SIZE) >> PAGE_SHIFT];
    5558    int rc = SUPR3Init(NULL);
    5659    if (RT_SUCCESS(rc))
     
    6972    pUVM->pVM = pVM;
    7073    pVM->pUVM = pUVM;
     74
     75    pVM->cCPUs = NUM_CPUS;
     76    pVM->cbSelf = RT_UOFFSETOF(VM, aCpus[pVM->cCPUs]);
    7177
    7278    rc = STAMR3InitUVM(pUVM);
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