Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
Loading...
Searching...
No Matches
Mmap Class Reference

Public Member Functions

void * map (off_t offset, size_t size)
void unmap ()

Static Public Member Functions

template<typename T>
static int read (off_t offset, T &value)
template<typename T>
static int write (off_t offset, const T &value)

Member Function Documentation

◆ map()

void * Mmap::map ( off_t offset,
size_t size )

Map a portion of memory.

Parameters
offsetthe memory offset to start the mapping at. There are no alignment requirements.
sizehow many bytes to map.
Returns
a pointer to the requested memory, or nullptr on failure.

◆ unmap()

void Mmap::unmap ( )

Discard the existing mapping. This is called automatically by the destructor or when calling map().

◆ read()

template<typename T>
int Mmap::read ( off_t offset,
T & value )
inlinestatic

Read the content of the memory at offset into value.

◆ write()

template<typename T>
int Mmap::write ( off_t offset,
const T & value )
inlinestatic

Write the content of value into the memory at offser.


The documentation for this class was generated from the following file: