libnx
Functions
virtmem.h File Reference

Virtual memory mapping utilities. More...

#include "../types.h"

Go to the source code of this file.

Functions

void * virtmemReserve (size_t size)
 Reserves a slice of general purpose address space. More...
 
void virtmemFree (void *addr, size_t size)
 Relinquishes a slice of address space reserved with virtmemReserve (currently no-op). More...
 
void * virtmemReserveMap (size_t size)
 Reserves a slice of address space inside the alias memory mapping region(s) (for use with svcMapMemory). More...
 
void virtmemFreeMap (void *addr, size_t size)
 Relinquishes a slice of address space reserved with virtmemReserveMap (currently no-op). More...
 

Detailed Description

Virtual memory mapping utilities.

Author
plutoo

Function Documentation

void virtmemFree ( void *  addr,
size_t  size 
)

Relinquishes a slice of address space reserved with virtmemReserve (currently no-op).

Parameters
addrPointer to the slice.
sizeSize of the slice.
void virtmemFreeMap ( void *  addr,
size_t  size 
)

Relinquishes a slice of address space reserved with virtmemReserveMap (currently no-op).

Parameters
addrPointer to the slice.
sizeSize of the slice.
void* virtmemReserve ( size_t  size)

Reserves a slice of general purpose address space.

Parameters
sizeThe size of the slice of address space that will be reserved (rounded up to page alignment).
Returns
Pointer to the slice of address space, or NULL on failure.
void* virtmemReserveMap ( size_t  size)

Reserves a slice of address space inside the alias memory mapping region(s) (for use with svcMapMemory).

Parameters
sizeThe size of the slice of address space that will be reserved (rounded up to page alignment).
Returns
Pointer to the slice of address space, or NULL on failure.