VirtualBox

Changeset 34216 in vbox


Ignore:
Timestamp:
Nov 20, 2010 8:35:50 PM (14 years ago)
Author:
vboxsync
Message:

VM.cpp: Fix freeing UVM structure, sizeof() doesn't work for VMs with more than one CPU

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VM.cpp

    r33595 r34216  
    545545        RTTlsFree(pUVM->vm.s.idxTLS);
    546546    }
    547     RTMemPageFree(pUVM, sizeof(*pUVM));
     547    RTMemPageFree(pUVM, RT_OFFSETOF(UVM, aCpus[pUVM->cCpus]));
    548548    return rc;
    549549}
     
    25972597
    25982598    ASMAtomicUoWriteU32(&pUVM->u32Magic, UINT32_MAX);
    2599     RTMemPageFree(pUVM, sizeof(*pUVM));
     2599    RTMemPageFree(pUVM, RT_OFFSETOF(UVM, aCpus[pUVM->cCpus]));
    26002600
    26012601    RTLogFlush(NULL);
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