libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
address_space.h File Reference

Address space management. More...

#include <libtransistor/types.h>
#include <sys/types.h>
Include dependency graph for address_space.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

result_t as_init ()
 Initialize address space manager. More...
 
void as_finalize ()
 Finalize address space manager. More...
 
void * as_reserve (size_t len)
 Finds and reserves an unmapped region of address space. More...
 
void as_release (void *addr, size_t len)
 Frees a region of address space reserved by as_reserve. More...
 

Detailed Description

Address space management.

Function Documentation

void as_finalize ( )

Finalize address space manager.

Called by crt0 and should not be called by applications or utility functions.

result_t as_init ( )

Initialize address space manager.

This should be called early in crt0 and should not be called by any applications or utility functions before using address space management functions.

void as_release ( void *  addr,
size_t  len 
)

Frees a region of address space reserved by as_reserve.

The address and size must exactly match an entire memory region reserved by as_reserve.

Parameters
addrBase of the reserved address space
lenLength of the reserved address space
void* as_reserve ( size_t  len)

Finds and reserves an unmapped region of address space.

Parameters
lenThe length of address space to reserve