VirtualBox

Changeset 55563 in vbox


Ignore:
Timestamp:
Apr 30, 2015 3:37:02 PM (10 years ago)
Author:
vboxsync
Message:

localipc-win.cpp: electric fence fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/localipc-win.cpp

    r47976 r55563  
    347347    /*
    348348     * Allocate and initialize the instance data.
     349     *
     350     * We align the size on pointer size here to make sure we get naturally
     351     * aligned members in the critsect when the electric fence heap is active.
    349352     */
    350353    size_t cchName = strlen(pszName);
    351     size_t cch = RT_OFFSETOF(RTLOCALIPCSERVERINT, szName[cchName + sizeof(RTLOCALIPC_WIN_PREFIX)]);
    352     PRTLOCALIPCSERVERINT pThis = (PRTLOCALIPCSERVERINT)RTMemAlloc(cch);
     354    size_t cbThis = RT_OFFSETOF(RTLOCALIPCSERVERINT, szName[cchName + sizeof(RTLOCALIPC_WIN_PREFIX)]);
     355    PRTLOCALIPCSERVERINT pThis = (PRTLOCALIPCSERVERINT)RTMemAlloc(RT_ALIGN(cbThis, sizeof(void *)));
    353356    if (!pThis)
    354357        return VERR_NO_MEMORY;
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