Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

RTDECL ( void *   ) 

Allocates temporary memory.

Temporary memory blocks are used for not too large memory blocks which are believed not to stick around for too long. Using this API instead of RTMemAlloc() not only gives the heap manager room for optimization but makes the code easier to read.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates zero'ed temporary memory.

Same as RTMemTmpAlloc() but the memory will be zero'ed.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates zero'ed memory.

Instead of memset(pv, 0, sizeof()) use this when you want zero'ed memory. This keeps the code smaller and the heap can skip the memset in about 0.42% of calls :-).

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Duplicates a chunk of memory into a new heap block.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cb The amount of memory to duplicate.
Duplicates a chunk of memory into a new heap block with some additional zeroed memory.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cbSrc The amount of memory to duplicate.
cbExtra The amount of extra memory to allocate and zero.
Reallocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Allocates memory which may contain code.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocate page aligned memory.

Returns:
Pointer to the allocated memory.

NULL if we're out of memory.

Parameters:
cb Size of the memory block. Will be rounded up to page size.
Allocate zero'ed page aligned memory.

Returns:
Pointer to the allocated memory.

NULL if we're out of memory.

Parameters:
cb Size of the memory block. Will be rounded up to page size.
Same as RTMemTmpAlloc() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemTmpAllocZ() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemAlloc() except that it's fenced.

Returns:
Pointer to the allocated memory. Free with RTMemEfFree().

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemAllocZ() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemRealloc() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Same as RTMemDup() except that it's fenced.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cb The amount of memory to duplicate.
Same as RTMemEfDupEx except that it's fenced.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cbSrc The amount of memory to duplicate.
cbExtra The amount of extra memory to allocate and zero.
Looks up a handle.

Returns:
The object pointer on success. NULL on failure.
Parameters:
hHandleTable The handle to the handle table.
h The handle to lookup.
Remarks:
Do not call this if RTHANDLETABLE_FLAGS_CONTEXT was used during creation.
Looks up and frees a handle.

Returns:
The object pointer on success. NULL on failure.
Parameters:
hHandleTable The handle to the handle table.
h The handle to lookup.
Remarks:
Do not call this if RTHANDLETABLE_FLAGS_CONTEXT was used during creation.
Looks up a handle.

Returns:
The object pointer on success. NULL on failure.
Parameters:
hHandleTable The handle to the handle table.
h The handle to lookup.
pvCtx The handle context, this must match what was given on allocation.
Remarks:
Call this if RTHANDLETABLE_FLAGS_CONTEXT was used during creation.
Looks up and frees a handle.

Returns:
The object pointer on success. NULL on failure.
Parameters:
hHandleTable The handle to the handle table.
h The handle to lookup.
pvCtx The handle context, this must match what was given on allocation.
Remarks:
Call this if RTHANDLETABLE_FLAGS_CONTEXT was used during creation.
Allocates zeroed memory from the specified simple heap.

Returns:
Pointer to the allocated memory block on success.

NULL if the request cannot be satisfied. (A VERR_NO_MEMORY condition.)

Parameters:
Heap The heap to allocate the memory on.
cb The requested heap block size.
cbAlignment The requested heap block alignment. Pass 0 for default alignment. Must be a power of 2.
Reallocates / Allocates / Frees a heap block.

Parameters:
Heap The heap. This is optional and will only be used for strict assertions.
pv The heap block returned by RTHeapSimple. If NULL it behaves like RTHeapSimpleAlloc().
cbNew The new size of the heap block. If NULL it behaves like RTHeapSimpleFree().
cbAlignment The requested heap block alignment. Pass 0 for default alignment. Must be a power of 2.
Remarks:
This API isn't implemented yet.
Reallocates / Allocates / Frees a heap block, zeroing any new bits.

Parameters:
Heap The heap. This is optional and will only be used for strict assertions.
pv The heap block returned by RTHeapSimple. If NULL it behaves like RTHeapSimpleAllocZ().
cbNew The new size of the heap block. If NULL it behaves like RTHeapSimpleFree().
cbAlignment The requested heap block alignment. Pass 0 for default alignment. Must be a power of 2.
Remarks:
This API isn't implemented yet.
Allocates zero'ed temporary memory.

Same as RTMemTmpAlloc() but the memory will be zero'ed.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates zero'ed memory.

Instead of memset(pv, 0, sizeof()) use this when you want zero'ed memory. This keeps the code smaller and the heap can skip the memset in about 0.42% of calls :-).

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Duplicates a chunk of memory into a new heap block.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cb The amount of memory to duplicate.
Duplicates a chunk of memory into a new heap block with some additional zeroed memory.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cbSrc The amount of memory to duplicate.
cbExtra The amount of extra memory to allocate and zero.
Reallocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Allocates memory which may contain code.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocate page aligned memory.

Returns:
Pointer to the allocated memory.

NULL if we're out of memory.

Parameters:
cb Size of the memory block. Will be rounded up to page size.
Allocate zero'ed page aligned memory.

Returns:
Pointer to the allocated memory.

NULL if we're out of memory.

Parameters:
cb Size of the memory block. Will be rounded up to page size.
Same as RTMemTmpAlloc() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemTmpAllocZ() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemAlloc() except that it's fenced.

Returns:
Pointer to the allocated memory. Free with RTMemEfFree().

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemAllocZ() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemRealloc() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Same as RTMemDup() except that it's fenced.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cb The amount of memory to duplicate.
Same as RTMemEfDupEx except that it's fenced.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
pvSrc The memory to duplicate.
cbSrc The amount of memory to duplicate.
cbExtra The amount of extra memory to allocate and zero.
Allocates zero'ed memory.

Instead of memset(pv, 0, sizeof()) use this when you want zero'ed memory. This keeps the code smaller and the heap can skip the memset in about 0.42% of calls :-).

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
hMemPool Handle to the pool to allocate the memory from.
cb Size in bytes of the memory block to allocated.
Duplicates a chunk of memory into a new heap block.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
hMemPool Handle to the pool to allocate the memory from.
pvSrc The memory to duplicate.
cb The amount of memory to duplicate.
Duplicates a chunk of memory into a new heap block with some additional zeroed memory.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
hMemPool Handle to the pool to allocate the memory from.
pvSrc The memory to duplicate.
cbSrc The amount of memory to duplicate.
cbExtra The amount of extra memory to allocate and zero.
Reallocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
hMemPool Handle to the pool containing the old memory.
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Allocates zero'ed temporary memory.

Same as RTMemTmpAlloc() but the memory will be zero'ed.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocates zero'ed memory.

Instead of memset(pv, 0, sizeof()) use this when you want zero'ed memory. This keeps the code smaller and the heap can skip the memset in about 0.42% of the calls :-).

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocates memory from the specified simple heap.

Returns:
Pointer to the allocated memory block on success.

NULL if the request cannot be satisfied. (A VERR_NO_MEMORY condition.)

Parameters:
Heap The heap to allocate the memory on.
cb The requested heap block size.
cbAlignment The requested heap block alignment. Pass 0 for default alignment. Must be a power of 2.
Allocates zeroed memory from the specified simple heap.

Returns:
Pointer to the allocated memory block on success.

NULL if the request cannot be satisfied. (A VERR_NO_MEMORY condition.)

Parameters:
Heap The heap to allocate the memory on.
cb The requested heap block size.
cbAlignment The requested heap block alignment. Pass 0 for default alignment. Must be a power of 2.
Reallocates / Allocates / Frees a heap block.

Parameters:
Heap The heap. This is optional and will only be used for strict assertions.
pv The heap block returned by RTHeapSimple. If NULL it behaves like RTHeapSimpleAlloc().
cbNew The new size of the heap block. If NULL it behaves like RTHeapSimpleFree().
cbAlignment The requested heap block alignment. Pass 0 for default alignment. Must be a power of 2.
Remarks:
This API isn't implemented yet.
Reallocates / Allocates / Frees a heap block, zeroing any new bits.

Parameters:
Heap The heap. This is optional and will only be used for strict assertions.
pv The heap block returned by RTHeapSimple. If NULL it behaves like RTHeapSimpleAllocZ().
cbNew The new size of the heap block. If NULL it behaves like RTHeapSimpleFree().
cbAlignment The requested heap block alignment. Pass 0 for default alignment. Must be a power of 2.
Remarks:
This API isn't implemented yet.
Allocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
hMemPool Handle to the pool to allocate the memory from.
cb Size in bytes of the memory block to allocated.
Allocates zero'ed memory.

Instead of memset(pv, 0, sizeof()) use this when you want zero'ed memory. This keeps the code smaller and the heap can skip the memset in about 0.42% of calls :-).

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
hMemPool Handle to the pool to allocate the memory from.
cb Size in bytes of the memory block to allocated.
Duplicates a chunk of memory into a new heap block.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
hMemPool Handle to the pool to allocate the memory from.
pvSrc The memory to duplicate.
cb The amount of memory to duplicate.
Duplicates a chunk of memory into a new heap block with some additional zeroed memory.

Returns:
New heap block with the duplicate data.

NULL if we're out of memory.

Parameters:
hMemPool Handle to the pool to allocate the memory from.
pvSrc The memory to duplicate.
cbSrc The amount of memory to duplicate.
cbExtra The amount of extra memory to allocate and zero.
Reallocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
hMemPool Handle to the pool containing the old memory.
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Allocates temporary memory.

Temporary memory blocks are used for not too large memory blocks which are believed not to stick around for too long. Using this API instead of RTMemAlloc() not only gives the heap manager room for optimization but makes the code easier to read.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates zero'ed temporary memory.

Same as RTMemTmpAlloc() but the memory will be zero'ed.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Allocates zero'ed memory.

Instead of memset(pv, 0, sizeof()) use this when you want zero'ed memory. This keeps the code smaller and the heap can skip the memset in about 0.42% of calls :-).

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocated.
Reallocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Allocates memory which may contain code.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemTmpAlloc() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemTmpAllocZ() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemAlloc() except that it's fenced.

Returns:
Pointer to the allocated memory. Free with RTMemEfFree().

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemAllocZ() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Same as RTMemRealloc() except that it's fenced.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Allocates temporary memory.

Temporary memory blocks are used for not too large memory blocks which are believed not to stick around for too long. Using this API instead of RTMemAlloc() not only gives the heap manager room for optimization but makes the code easier to read.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocates zero'ed temporary memory.

Same as RTMemTmpAlloc() but the memory will be zero'ed.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocates zero'ed memory.

Instead of memset(pv, 0, sizeof()) use this when you want zero'ed memory. This keeps the code smaller and the heap can skip the memset in about 0.42% of the calls :-).

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Reallocates memory.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
pvOld The memory block to reallocate.
cbNew The new block size (in bytes).
Allocates memory which may contain code.

Returns:
Pointer to the allocated memory.

NULL on failure.

Parameters:
cb Size in bytes of the memory block to allocate.
Allocate page aligned memory.

Returns:
Pointer to the allocated memory.

NULL if we're out of memory.

Parameters:
cb Size of the memory block. Will be rounded up to page size.
Allocate zero'ed page aligned memory.

Returns:
Pointer to the allocated memory.

NULL if we're out of memory.

Parameters:
cb Size of the memory block. Will be rounded up to page size.

Definition at line 97 of file alloc-r0drv.cpp.

References AssertMsg, AssertMsgFailed, DWORD, NULL, PAGE_OFFSET_MASK, PAGE_SIZE, and RT_ALIGN_Z.

{
    return RTMemAllocZ(cb);
}


Generated by  Doxygen 1.6.0   Back to index