VirtualBox

Changeset 52021 in vbox


Ignore:
Timestamp:
Jul 14, 2014 8:28:13 PM (10 years ago)
Author:
vboxsync
Message:

IPRT/RTMemLocked*: Ditch API, was only implemented on POSIX and there are better ways to allocate locked down memory

Location:
trunk
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mem.h

    r51074 r52021  
    506506RTDECL(void) RTMemWipeThoroughly(void *pv, size_t cb, size_t cMinPasses) RT_NO_THROW;
    507507
    508 /**
    509  * Allocate locked memory with default tag - extended version.
    510  *
    511  * @returns IPRT status code.
    512  * @param   cb      The amount of memory to allocate.
    513  * @param   ppv     Where to store the pointer to the allocated memory on success.
    514  */
    515 #define RTMemLockedAllocEx(cb, ppv) RTMemLockedAllocExTag((cb), RTMEM_TAG, (ppv))
    516 
    517 /**
    518  * Allocate locked memory - extended version.
    519  *
    520  * @returns IPRT status code.
    521  * @param   cb      The amount of memory to allocate.
    522  * @param   pszTag  Allocation tag used for statistics and such.
    523  * @param   ppv     Where to store the pointer to the allocated memory on success.
    524  */
    525 RTDECL(int) RTMemLockedAllocExTag(size_t cb, const char *pszTag, void **ppv) RT_NO_THROW;
    526 
    527 /**
    528  * Allocate zeroed locked memory with default tag - extended version.
    529  *
    530  * @returns IPRT status code.
    531  * @param   cb      The amount of memory to allocate.
    532  * @param   ppv     Where to store the pointer to the allocated memory on success.
    533  */
    534 #define RTMemLockedAllocZEx(cb, ppv) RTMemLockedAllocZExTag((cb), RTMEM_TAG, (ppv))
    535 
    536 /**
    537  * Allocate zeroed locked memory - extended version.
    538  *
    539  * @returns IPRT status code.
    540  * @param   cb      The amount of memory to allocate.
    541  * @param   pszTag  Allocation tag used for statistics and such.
    542  * @param   ppv     Where to store the pointer to the allocated memory on success.
    543  */
    544 RTDECL(int) RTMemLockedAllocZExTag(size_t cb, const char *pszTag, void **ppv) RT_NO_THROW;
    545 
    546 /**
    547  * Allocate locked memory with the default tag - shortcut for RTMemLockedAllocExTag().
    548  *
    549  * @returns Pointer to allocated memory on success.
    550  * @returns NULL on failure (use RTMemLockedAllocExTag() if the specific reason is required)
    551  * @param   cb      The amount of memory to allocate.
    552  */
    553 #define RTMemLockedAlloc(cb) RTMemLockedAllocTag((cb), RTMEM_TAG)
    554 
    555 /**
    556  * Allocate locked memory - shortcut for RTMemLockedAllocExTag().
    557  *
    558  * @returns Pointer to allocated memory on success.
    559  * @returns NULL on failure (use RTMemLockedAllocExTag() if the specific reason is required)
    560  * @param   cb      The amount of memory to allocate.
    561  * @param   pszTag  Allocation tag used for statistics and such.
    562  */
    563 RTDECL(void *) RTMemLockedAllocTag(size_t cb, const char *pszTag) RT_NO_THROW;
    564 
    565 /**
    566  * Allocate locked zeroed memory with the default tag - shortcut for RTMemLockedAllocZExTag().
    567  *
    568  * @returns Pointer to allocated memory on success.
    569  * @returns NULL on failure (use RTMemLockedAllocZExTag() if the specific reason is required)
    570  * @param   cb      The amount of memory to allocate.
    571  */
    572 #define RTMemLockedAllocZ(cb) RTMemLockedAllocZTag((cb), RTMEM_TAG)
    573 
    574 /**
    575  * Allocate locked zeroed memory - shortcut for RTMemLockedAllocZExTag().
    576  *
    577  * @returns Pointer to allocated memory on success.
    578  * @returns NULL on failure (use RTMemLockedAllocZExTag() if the specific reason is required)
    579  * @param   cb      The amount of memory to allocate.
    580  * @param   pszTag  Allocation tag used for statistics and such.
    581  */
    582 RTDECL(void *) RTMemLockedAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW;
    583 
    584 /**
    585  * Frees memory allocated with any of the RTMemLockedAlloc* API.
    586  *
    587  * @returns nothing.
    588  * @param   pv    Pointer to the memory block to free.
    589  */
    590 RTDECL(void) RTMemLockedFree(void *pv) RT_NO_THROW;
    591 
    592 
    593508#ifdef IN_RING0
    594509
  • trunk/src/VBox/Runtime/Makefile.kmk

    r51940 r52021  
    734734        r3/win/symlink-win.cpp \
    735735        r3/win/rtFileNativeSetAttributes-win.cpp \
    736         r3/win/rtmemlocked-win.cpp \
    737736        r3/win/thread-win.cpp \
    738737        r3/win/thread2-win.cpp \
     
    786785        r3/posix/RTTimeSet-posix.cpp \
    787786        r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
    788         r3/posix/rtmemlocked-posix.cpp \
    789787        r3/posix/dir-posix.cpp \
    790788        r3/posix/env-posix.cpp \
     
    957955        r3/posix/ldrNative-posix.cpp \
    958956        r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
    959         r3/posix/rtmemlocked-posix.cpp \
    960957        r3/posix/path-posix.cpp \
    961958        r3/posix/path2-posix.cpp \
     
    10231020        r3/posix/ldrNative-posix.cpp \
    10241021        r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
    1025         r3/posix/rtmemlocked-posix.cpp \
    10261022        r3/posix/path-posix.cpp \
    10271023        r3/posix/path2-posix.cpp \
     
    10821078        r3/posix/ldrNative-posix.cpp \
    10831079        r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
    1084         r3/posix/rtmemlocked-posix.cpp \
    10851080        r3/posix/path-posix.cpp \
    10861081        r3/posix/path2-posix.cpp \
     
    11611156        r3/posix/ldrNative-posix.cpp \
    11621157        r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
    1163         r3/posix/rtmemlocked-posix.cpp \
    11641158        r3/posix/path-posix.cpp \
    11651159        r3/posix/path2-posix.cpp \
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