VirtualBox

Ignore:
Timestamp:
Jul 28, 2010 3:15:35 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64135
Message:

iprt,++: Tag allocation in all builds with a string, defaulting to FILE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/utf-8.cpp

    r30859 r31157  
    55
    66/*
    7  * Copyright (C) 2006-2009 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    672672
    673673
    674 RTDECL(int) RTStrToUtf16(const char *pszString, PRTUTF16 *ppwszString)
     674RTDECL(int) RTStrToUtf16Tag(const char *pszString, PRTUTF16 *ppwszString, const char *pszTag)
    675675{
    676676    /*
     
    691691         * Allocate buffer.
    692692         */
    693         PRTUTF16 pwsz = (PRTUTF16)RTMemAlloc((cwc + 1) * sizeof(RTUTF16));
     693        PRTUTF16 pwsz = (PRTUTF16)RTMemAllocTag((cwc + 1) * sizeof(RTUTF16), pszTag);
    694694        if (pwsz)
    695695        {
     
    710710    return rc;
    711711}
    712 RT_EXPORT_SYMBOL(RTStrToUtf16);
    713 
    714 
    715 RTDECL(int)  RTStrToUtf16Ex(const char *pszString, size_t cchString, PRTUTF16 *ppwsz, size_t cwc, size_t *pcwc)
     712RT_EXPORT_SYMBOL(RTStrToUtf16Tag);
     713
     714
     715RTDECL(int)  RTStrToUtf16ExTag(const char *pszString, size_t cchString,
     716                               PRTUTF16 *ppwsz, size_t cwc, size_t *pcwc, const char *pszTag)
    716717{
    717718    /*
     
    749750            fShouldFree = true;
    750751            cwc = RT_MAX(cwcResult + 1, cwc);
    751             pwszResult = (PRTUTF16)RTMemAlloc(cwc * sizeof(RTUTF16));
     752            pwszResult = (PRTUTF16)RTMemAllocTag(cwc * sizeof(RTUTF16), pszTag);
    752753        }
    753754        if (pwszResult)
     
    770771    return rc;
    771772}
    772 RT_EXPORT_SYMBOL(RTStrToUtf16Ex);
     773RT_EXPORT_SYMBOL(RTStrToUtf16ExTag);
    773774
    774775
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