OSAllocVirtAddr

Syntax

#include <cafe/os.h>
    
va_t OSAllocVirtAddr(va_t va, size_t size, size_t align);

Parameters

va NULL or the specific address to allocate.
size The size of the range to allocate.
align Zero or a power of two that specifies an alignment restriction.

Return Values

Returns the virtual address that was allocated, or NULL on failure.

Description

Allocates a range of size bytes of virtual addresses for later memory-mapping. The range can be chosen explicitly by specifying a non-NULL va, or can be chosen by the system. The address range allocation can be made to start on a specific power of two alignment as specified by the align argument.

Do Not Call From

None.

See Also

OSGetMemBound
OSGetPageSize
OSGetMapVirtAddrRange
OSGetDataPhysAddrRange
OSGetAvailPhysAddrRange
OSFreeVirtAddr
OSMapMemory
OSUnmapMemory

Revision History

2013/05/08 Automated cleanup pass.
2011/12/01 Initial version.


CONFIDENTIAL