Phoenix
Object-oriented orthogonally persistent operating system
|
Class representing generic address of the VM subsystem. More...
#include <vm.h>
Public Member Functions | |
Addr (AddrType addr=0) | |
Construct VM address from VM address integer type. | |
template<typename T > | |
Addr (T addr) | |
Construct VM address from any integer type. | |
template<typename T > | |
Addr (T *ptr) | |
Construct VM address from pointer type. | |
Addr & | operator= (AddrType addr) |
Assign address value to VM address. | |
Addr & | operator= (void *ptr) |
Assign pointer value to VM address. | |
Addr & | operator+= (const Addr &addr) |
Add another VM address to the current one. | |
Addr & | operator+= (const AddrType addr) |
Add another VM address to the current one. | |
Addr & | operator-= (const Addr &addr) |
Subtract another VM address from the current one. | |
Addr & | operator-= (const AddrType addr) |
Subtract another VM address from the current one. | |
bool | operator== (const Addr &addr) |
Compare VM addresses. | |
bool | operator== (void *ptr) |
Compare VM addresses. | |
bool | operator== (AddrType addr) |
Compare VM addresses. | |
bool | operator== (int addr) |
Compare VM addresses. | |
bool | operator!= (const Addr &addr) |
Compare VM addresses. | |
bool | operator!= (void *ptr) |
Compare VM addresses. | |
bool | operator!= (AddrType addr) |
Compare VM addresses. | |
bool | operator!= (int addr) |
Compare VM addresses. | |
bool | operator< (Addr &addr) |
Compare VM addresses. | |
template<typename T > | |
bool | operator< (T addr) |
Compare VM addresses. | |
bool | operator<= (Addr &addr) |
Compare VM addresses. | |
template<typename T > | |
bool | operator<= (T addr) |
Compare VM addresses. | |
bool | operator> (Addr &addr) |
Compare VM addresses. | |
template<typename T > | |
bool | operator> (T addr) |
Compare VM addresses. | |
bool | operator>= (Addr &addr) |
Compare VM addresses. | |
template<typename T > | |
bool | operator>= (T addr) |
Compare VM addresses. | |
Addr | operator+ (Addr &addr) |
Sum VM addresses. | |
template<typename T > | |
Addr | operator+ (T addr) |
Sum VM addresses. | |
Addr | operator- (Addr &addr) |
Subtract VM addresses. | |
template<typename T > | |
Addr | operator- (T addr) |
Subtract VM addresses. | |
operator AddrType () | |
Cast VM address value to base address type. | |
AddrType | BaseAddr () |
Return VM address base type value. | |
operator void * () | |
Cast VM address value to a generic pointer. | |
template<typename T > | |
operator T * () | |
Cast VM address value to a pointer of specified type. | |
Addr & | RoundUp (AddrType alignment=PAGE_SIZE) |
Round up VM address. | |
Addr & | RoundDown (AddrType alignment=PAGE_SIZE) |
Round down VM address. | |
bool | IsAligned (AddrType alignment=PAGE_SIZE) |
Check if the address aligned to specified alignment value. | |
PageIdx | GetPageIdx () |
Get page index which corresponds to a given virtual address. | |
vaddr_t | GetPageOffset () |
Get offset in the page which corresponds to a given virtual address. | |
bool | CheckFmtChar (char fmtChar) |
Support for converting this class to string via text_stream::OTextStream. | |
bool | ToString (text_stream::OTextStreamBase &stream, text_stream::OTextStreamBase::Context &ctx, char fmtChar=0) |
Support for converting this class to string via text_stream::OTextStream. |
Class representing generic address of the VM subsystem.
Construct VM address from VM address integer type.
Construct VM address from any integer type.
Construct VM address from pointer type.
AddrType vm::Addr< AddrType >::BaseAddr | ( | ) | [inline] |
Return VM address base type value.
bool vm::Addr< AddrType >::CheckFmtChar | ( | char | fmtChar | ) | [inline] |
Support for converting this class to string via text_stream::OTextStream.
Get page index which corresponds to a given virtual address.
Get offset in the page which corresponds to a given virtual address.
bool vm::Addr< AddrType >::IsAligned | ( | AddrType | alignment = PAGE_SIZE | ) | [inline] |
Check if the address aligned to specified alignment value.
alignment | Alignment value, must be power of two. |
vm::Addr< AddrType >::operator AddrType | ( | ) | [inline] |
Cast VM address value to base address type.
vm::Addr< AddrType >::operator void * | ( | ) | [inline] |
Cast VM address value to a generic pointer.
bool vm::Addr< AddrType >::operator!= | ( | void * | ptr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator!= | ( | AddrType | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator!= | ( | const Addr< AddrType > & | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator!= | ( | int | addr | ) | [inline] |
Compare VM addresses.
Addr vm::Addr< AddrType >::operator+ | ( | Addr< AddrType > & | addr | ) | [inline] |
Sum VM addresses.
Addr vm::Addr< AddrType >::operator+ | ( | T | addr | ) | [inline] |
Sum VM addresses.
Addr& vm::Addr< AddrType >::operator+= | ( | const Addr< AddrType > & | addr | ) | [inline] |
Add another VM address to the current one.
Add another VM address to the current one.
Addr vm::Addr< AddrType >::operator- | ( | Addr< AddrType > & | addr | ) | [inline] |
Subtract VM addresses.
Addr vm::Addr< AddrType >::operator- | ( | T | addr | ) | [inline] |
Subtract VM addresses.
Subtract another VM address from the current one.
Addr& vm::Addr< AddrType >::operator-= | ( | const Addr< AddrType > & | addr | ) | [inline] |
Subtract another VM address from the current one.
bool vm::Addr< AddrType >::operator< | ( | T | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator< | ( | Addr< AddrType > & | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator<= | ( | Addr< AddrType > & | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator<= | ( | T | addr | ) | [inline] |
Compare VM addresses.
Assign pointer value to VM address.
Assign address value to VM address.
bool vm::Addr< AddrType >::operator== | ( | void * | ptr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator== | ( | AddrType | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator== | ( | int | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator== | ( | const Addr< AddrType > & | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator> | ( | T | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator> | ( | Addr< AddrType > & | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator>= | ( | Addr< AddrType > & | addr | ) | [inline] |
Compare VM addresses.
bool vm::Addr< AddrType >::operator>= | ( | T | addr | ) | [inline] |
Compare VM addresses.
Addr& vm::Addr< AddrType >::RoundDown | ( | AddrType | alignment = PAGE_SIZE | ) | [inline] |
Round down VM address.
Template parameter alignment specifies an alignment to apply for rounding.
Addr& vm::Addr< AddrType >::RoundUp | ( | AddrType | alignment = PAGE_SIZE | ) | [inline] |
Round up VM address.
Template parameter alignment specifies an alignment to apply for rounding.
bool vm::Addr< AddrType >::ToString | ( | text_stream::OTextStreamBase & | stream, |
text_stream::OTextStreamBase::Context & | ctx, | ||
char | fmtChar = 0 |
||
) | [inline] |
Support for converting this class to string via text_stream::OTextStream.