dxd - dynax driver framework  2675
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dxd::memory< scope_t > Class Template Reference

virtual kernel memory description More...

#include <dxd_memory.h>

Public Member Functions

void free ()
 
void free ()
 IOKit memory free. More...
 
template<>
void free ()
 
template<>
void free ()
 
os_result initialize (const void *data, size_t size)
 
os_result initialize (const void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (const ::MDL *mdl)
 
os_result initialize (void *data, size_t size)
 IOKit memory initializer. More...
 
os_result initialize (const ::MDL *mdl, size_t offset, size_t size)
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor)
 IOKit memory initializer. More...
 
os_result initialize (::IOMemoryDescriptor *iokit_memory_descriptor, size_t offset, size_t size)
 IOKit memory initializer. More...
 
template<>
os_result initialize (const void *data, size_t size)
 
template<>
os_result initialize (const void *data, size_t size)
 
template<>
os_result initialize (void *data, size_t size)
 
template<>
os_result initialize (const void *data, size_t size)
 
template<>
os_result initialize (void *data, size_t size)
 
template<>
os_result initialize (const void *data, size_t size)
 
 memory ()=default
 
 memory ()=default
 IOKit default constructor. More...
 
 memory (const void *data, size_t size)
 WDK memory constructor. More...
 
 memory (const void *data, size_t size)
 IOKit class constructor. More...
 
 memory (const ::MDL *mdl)
 
 operator const ::IOMemoryDescriptor * () const
 IOKit IOMemoryDescriptor* implicit cast. More...
 
 operator uint64_t () const
 IOKit physical address (only relevant for contigous memory) More...
 
 operator::IOMemoryDescriptor * ()
 
 operator::MDL * () const
 
size_t size () const
 IOKit memory size. More...
 
virtual ~memory ()
 WDK: memory destructor. More...
 
 ~memory ()
 IOKit memory destructor. More...
 

Public Attributes

os_result status =not_initialized
 IOKit memory status. More...
 

Detailed Description

template<dx::scope scope_t = dx::kernel>
class dxd::memory< scope_t >

virtual kernel memory description

WDK: virtual kernel memory description.

The dxd::memory is a kernel memory representation of the kernels virtual memory description. It is an internally used wrapper to generate a virtual kernel memory representation from a platform independent pointer:size description.

Constructor & Destructor Documentation

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::memory ( )
default

IOKit default constructor.

Use this in conjunction with initialize()

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::memory ( const void *  data,
size_t  size 
)
inline

IOKit class constructor.

Calls initialize() member.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::~memory ( )
inline

IOKit memory destructor.

Calls free() member.

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::memory ( )
default
template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::memory ( const void *  data,
size_t  size 
)
inline

WDK memory constructor.

Parameters
datasource data pointer
sizesource data size
template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::memory ( const ::MDL *  mdl)
inline
Parameters
mdlsource MDL
template<dx::scope scope_t = dx::kernel>
virtual dxd::memory< scope_t >::~memory ( )
inline

WDK: memory destructor.

Member Function Documentation

template<dx::scope scope_t = dx::kernel>
void dxd::memory< scope_t >::free ( )
template<dx::scope scope_t = dx::kernel>
void dxd::memory< scope_t >::free ( )
inline

IOKit memory free.

Checks the underlaying OS memory descriptor,

synchronizes and unwires it from memory and

releases the memory descriptor.

+ Here is the caller graph for this function:

template<>
void dxd::memory< dx::kernel >::free ( )
template<>
void dxd::memory< dx::user >::free ( )
template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( const void *  data,
size_t  size 
)
template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( const void *  data,
size_t  size 
)

IOKit memory initializer.

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

+ Here is the caller graph for this function:

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( const ::MDL *  mdl)
inline

in contrast to an IOKit MemoryDescriptor MDLs do not support reference counting. take care when creating a dxd::memory from a dxd::buffer: although the dxd::memory holds an MDL to the buffer the buffer itself is not retained after the dxd::buffer is released!

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( void *  data,
size_t  size 
)

IOKit memory initializer.

Parameters
datavirtual base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( const ::MDL *  mdl,
size_t  offset,
size_t  size 
)
inline
template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor)
inline

IOKit memory initializer.

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::initialize ( ::IOMemoryDescriptor *  iokit_memory_descriptor,
size_t  offset,
size_t  size 
)
inline

IOKit memory initializer.

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

Allows re-initialization

Parameters
datavirtual read only kernel base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
template<>
os_result dxd::memory< dx::user >::initialize ( const void *  data,
size_t  size 
)

Allows re-initialization

Parameters
datavirtual read only user base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
template<>
os_result dxd::memory< dx::kernel >::initialize ( void *  data,
size_t  size 
)

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
template<>
os_result dxd::memory< dx::kernel >::initialize ( const void *  data,
size_t  size 
)

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
template<>
os_result dxd::memory< dx::user >::initialize ( void *  data,
size_t  size 
)

Allows re-initialization.

Creates OS memory descriptor from user space data,size and

wires it down and syschronizes it.

Parameters
datavirtual user space base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
template<>
os_result dxd::memory< dx::user >::initialize ( const void *  data,
size_t  size 
)

Allows re-initialization.

Creates OS memory descriptor from user space data,size and

wires it down and syschronizes it.

Parameters
datavirtual read only user space base address of range to create memory descriptor from
sizesize of range to create memory descriptor from
template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator const ::IOMemoryDescriptor * ( ) const
inline

IOKit IOMemoryDescriptor* implicit cast.

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator uint64_t ( ) const
inline

IOKit physical address (only relevant for contigous memory)

template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator::IOMemoryDescriptor * ( )
inline
template<dx::scope scope_t = dx::kernel>
dxd::memory< scope_t >::operator::MDL * ( ) const
inline
template<dx::scope scope_t = dx::kernel>
size_t dxd::memory< scope_t >::size ( ) const
inline

IOKit memory size.

Member Data Documentation

template<dx::scope scope_t = dx::kernel>
os_result dxd::memory< scope_t >::status =not_initialized

IOKit memory status.

status of memory object


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

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Dec 4 2018

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.