VirtualBox

Ignore:
Timestamp:
Apr 13, 2010 7:29:42 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60013
Message:

IPRT: Some efence adjustments, adding RTMemAllocVar and RTMemAllocZVar for dealing with struct + string style allocations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/lockvalidator.cpp

    r28267 r28271  
    10721072    size_t const       cbFile   = pSrcPos->pszFile ? strlen(pSrcPos->pszFile) + 1 : 0;
    10731073    size_t const     cbFunction = pSrcPos->pszFile ? strlen(pSrcPos->pszFunction) + 1 : 0;
    1074     RTLOCKVALCLASSINT *pThis    = (RTLOCKVALCLASSINT *)RTMemAlloc(sizeof(*pThis) + cbFile + cbFunction + cbName);
     1074    RTLOCKVALCLASSINT *pThis    = (RTLOCKVALCLASSINT *)RTMemAllocVar(sizeof(*pThis) + cbFile + cbFunction + cbName);
    10751075    if (!pThis)
    10761076        return VERR_NO_MEMORY;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette