dxd - dynax driver framework 2.5.0d148
cross platform open source driver development framework
Loading...
Searching...
No Matches
buffer< scope_t, limit_t, alignment_t, contigous_t > Class Template Reference

DriverKit memory buffer w/o alignment and boundary requirements. More...

#include <dxd_memory.h>

+ Inheritance diagram for buffer< scope_t, limit_t, alignment_t, contigous_t >:
+ Collaboration diagram for buffer< scope_t, limit_t, alignment_t, contigous_t >:

Public Member Functions

 buffer ()=default
 DriverKit default buffer constructor.
 
 buffer (size_t size, unsigned int limit=limit_t, unsigned int alignment=alignment_t, bool contigous=contigous_t)
 DriverKit buffer constructor.
 
void free ()
 
void free ()
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer from kernel virtual addresses.
 
os_result initialize (size_t size, unsigned int=limit_t, unsigned int alignment=alignment_t, bool=contigous_t)
 DriverKit buffer initializer.
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer from kernel virtual addresses.
 

Detailed Description

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
class buffer< scope_t, limit_t, alignment_t, contigous_t >

DriverKit memory buffer w/o alignment and boundary requirements.

The dxd::buffer is a DriverKit memory representation with an associated memory backing store allocation. The memory backing store is owned by this DriverKit memory representation and the reference will be released when this object is destroyed.

Constructor & Destructor Documentation

◆ buffer() [1/2]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( )
default

DriverKit default buffer constructor.

Use this in conjunction with initialize()

◆ buffer() [2/2]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
buffer< scope_t, limit_t, alignment_t, contigous_t >::buffer ( size_t size,
unsigned int limit = limit_t,
unsigned int alignment = alignment_t,
bool contigous = contigous_t )
inline

DriverKit buffer constructor.

Parameters
sizesize to be alloced by buffer object
limitlimit physical memory address space
alignmentenforce physical memory alignment
contigousenforce contiguos physical memory
+ Here is the call graph for this function:

Member Function Documentation

◆ free() [1/2]

void memory< dx::kernel >::free ( )
inherited

◆ free() [2/2]

void memory< dx::user >::free ( )
inherited

◆ initialize() [1/3]

os_result memory< dx::kernel >::initialize ( const void * data,
size_t size )
inherited

IOKit memory initializer from kernel virtual addresses.

Allows re-initialization.

Creates OS memory descriptor from kernel space data,size and

wires it down and synchronizes it.

Parameters
datavirtual read only kernel base address of range to create memory descriptor from
sizesize of range to create memory descriptor from

◆ initialize() [2/3]

template<dx::scope scope_t = dx::kernel, unsigned int limit_t = 64, unsigned int alignment_t = 0, bool contigous_t = false>
os_result buffer< scope_t, limit_t, alignment_t, contigous_t >::initialize ( size_t size,
unsigned int = limit_t,
unsigned int alignment = alignment_t,
bool = contigous_t )
inline

DriverKit buffer initializer.

Allows re-initialization.

Creates a buffer and associated memory descriptor.

Parameters
sizesize to be alloced by buffer object
alignmentenforce physical memory alignment
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize() [3/3]

os_result memory< dx::kernel >::initialize ( void * data,
size_t size )
inherited

IOKit memory initializer from kernel virtual addresses.

Allows re-initialization.

Creates OS memory descriptor from kernel space data,size and

wires it down and synchronizes it.

Parameters
datavirtual kernel base address of range to create memory descriptor from
sizesize of range to create memory descriptor from

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Aug 22 2025

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.