VirtualBox

Changeset 31158 in vbox for trunk/src/VBox/Runtime/r3/win


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

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

File:
1 edited

Legend:

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

    r28800 r31158  
    11/* $Id$ */
    22/** @file
    3  * IPRT - Memory Allocation, Win32.
     3 * IPRT - Memory Allocation, Windows.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4343
    4444
    45 /**
    46  * Allocates memory which may contain code.
    47  *
    48  * @returns Pointer to the allocated memory.
    49  * @returns NULL on failure.
    50  * @param   cb      Size in bytes of the memory block to allocate.
    51  */
    52 RTDECL(void *) RTMemExecAlloc(size_t cb) RT_NO_THROW
     45RTDECL(void *) RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW
    5346{
    5447    /*
     
    8376
    8477
    85 /**
    86  * Free executable/read/write memory allocated by RTMemExecAlloc().
    87  *
    88  * @param   pv      Pointer to memory block.
    89  */
    9078RTDECL(void)    RTMemExecFree(void *pv) RT_NO_THROW
    9179{
     
    9583
    9684
    97 /**
    98  * Allocate page aligned memory.
    99  *
    100  * @returns Pointer to the allocated memory.
    101  * @returns NULL if we're out of memory.
    102  * @param   cb  Size of the memory block. Will be rounded up to page size.
    103  */
    104 RTDECL(void *) RTMemPageAlloc(size_t cb) RT_NO_THROW
     85RTDECL(void *) RTMemPageAllocTag(size_t cb, const char *pszTag) RT_NO_THROW
    10586{
    10687#ifdef USE_VIRTUAL_ALLOC
     
    11495
    11596
    116 /**
    117  * Allocate zero'ed page aligned memory.
    118  *
    119  * @returns Pointer to the allocated memory.
    120  * @returns NULL if we're out of memory.
    121  * @param   cb  Size of the memory block. Will be rounded up to page size.
    122  */
    123 RTDECL(void *) RTMemPageAllocZ(size_t cb) RT_NO_THROW
     97RTDECL(void *) RTMemPageAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW
    12498{
    12599#ifdef USE_VIRTUAL_ALLOC
     
    138112
    139113
    140 /**
    141  * Free a memory block allocated with RTMemPageAlloc() or RTMemPageAllocZ().
    142  *
    143  * @param   pv      Pointer to the block as it was returned by the allocation function.
    144  *                  NULL will be ignored.
    145  */
    146114RTDECL(void) RTMemPageFree(void *pv, size_t cb) RT_NO_THROW
    147115{
     
    158126
    159127
    160 /**
    161  * Change the page level protection of a memory region.
    162  *
    163  * @returns iprt status code.
    164  * @param   pv          Start of the region. Will be rounded down to nearest page boundary.
    165  * @param   cb          Size of the region. Will be rounded up to the nearest page boundary.
    166  * @param   fProtect    The new protection, a combination of the RTMEM_PROT_* defines.
    167  */
    168128RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) RT_NO_THROW
    169129{
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