Loading...
Searching...
No Matches
omPage.h File Reference

Go to the source code of this file.

## Macros

#define | OM_SIZEOF_INDEX_PAGE (SIZEOF_SYSTEM_PAGE << LOG_BIT_SIZEOF_LONG)
#define | omGetPageShiftOfAddr(addr)
#define | omGetPageIndexOfAddr(addr)
#define | omIsPageAddr(addr)
#define | omRegisterPageIndex(index)
#define | omRegisterExternalAddr(addr)
#define | omRegisterPageAddr(addr)
#define | omIsAddrPageAligned(addr)
#define | omGetPageOfAddr(addr)
#define | omGetBinPageOfAddr(addr)
#define | omIsAddrOnPage(addr, page)
#define | omAreAddrOnSamePage(a1, a2)
#define | omIsNotAddrOnFreePage(addr)

## Functions

void | omPageIndexFault (unsigned long page_index)
void * | omGetPage ()
void | omFreePage (void *page)
void | omReleaseFreePages ()
int | omGetNumberOfFreePages ()
int | omGetNumberOfUsedPages ()
int | omGetNumberOfAllocatedPages ()
int | omIsAddrOnFreePage (void *addr)
int | omIsAddrOnRegisteredPage (void *addr)

## Variables

unsigned long | omMaxPageIndex
unsigned long | omMinPageIndex
unsigned long * | omPageIndicies

## Macro Definition Documentation

## OM_SIZEOF_INDEX_PAGE

#define OM_SIZEOF_INDEX_PAGE (SIZEOF_SYSTEM_PAGE << LOG_BIT_SIZEOF_LONG)

Definition at line 36 of file omPage.h.

## omAreAddrOnSamePage

#define omAreAddrOnSamePage | ( |  | a1,
|  |  | a2 )

Value:
(omGetPageOfAddr(a1) == omGetPageOfAddr(a2))
omGetPageOfAddr
#define omGetPageOfAddr(addr)
Definition omBinPage.h:19

Definition at line 114 of file omPage.h.

#define omAreAddrOnSamePage(a1, a2) \
(omGetPageOfAddr(a1) == omGetPageOfAddr(a2))

## omGetBinPageOfAddr

#define omGetBinPageOfAddr | ( |  | addr | ) |

Value:
((omBinPage) ((long) (addr) & ~(SIZEOF_SYSTEM_PAGE -1)))
omBinPage
omBinPage_t * omBinPage
Definition omStructs.h:16

Definition at line 109 of file omPage.h.

#define omGetBinPageOfAddr(addr) \
((omBinPage) ((long) (addr) & ~(SIZEOF_SYSTEM_PAGE -1)))

## omGetPageIndexOfAddr

#define omGetPageIndexOfAddr | ( |  | addr | ) |

Value:
(((unsigned long) addr) >> (LOG_BIT_SIZEOF_LONG + LOG_BIT_SIZEOF_SYSTEM_PAGE))

Definition at line 41 of file omPage.h.

#define omGetPageIndexOfAddr(addr) \
(((unsigned long) addr) >> (LOG_BIT_SIZEOF_LONG + LOG_BIT_SIZEOF_SYSTEM_PAGE))

## omGetPageOfAddr

#define omGetPageOfAddr | ( |  | addr | ) |

Value:
((void*) ((long) (addr) & ~(SIZEOF_SYSTEM_PAGE -1)))

Definition at line 106 of file omPage.h.

#define omGetPageOfAddr(addr) \
((void*) ((long) (addr) & ~(SIZEOF_SYSTEM_PAGE -1)))

## omGetPageShiftOfAddr

#define omGetPageShiftOfAddr | ( |  | addr | ) |

Value:
((((unsigned long) addr) & (OM_SIZEOF_INDEX_PAGE -1)) >> LOG_BIT_SIZEOF_SYSTEM_PAGE)
OM_SIZEOF_INDEX_PAGE
#define OM_SIZEOF_INDEX_PAGE
Definition omBinPage.h:58

Definition at line 38 of file omPage.h.

#define omGetPageShiftOfAddr(addr) \
((((unsigned long) addr) & (OM_SIZEOF_INDEX_PAGE -1)) >> LOG_BIT_SIZEOF_SYSTEM_PAGE)

## omIsAddrOnPage

#define omIsAddrOnPage | ( |  | addr,
|  |  | page )

Value:
(omGetPageOfAddr(addr) == (void*) (page))

Definition at line 112 of file omPage.h.

## omIsAddrPageAligned

#define omIsAddrPageAligned | ( |  | addr | ) |

Value:
(((long) (addr) & (SIZEOF_SYSTEM_PAGE -1)) == 0)

Definition at line 103 of file omPage.h.

#define omIsAddrPageAligned(addr) \
(((long) (addr) & (SIZEOF_SYSTEM_PAGE -1)) == 0)

## omIsNotAddrOnFreePage

#define omIsNotAddrOnFreePage | ( |  | addr | ) |

Value:
(!omIsAddrOnFreePage(addr))
omIsAddrOnFreePage
int omIsAddrOnFreePage(void *addr)

Definition at line 120 of file omPage.h.

## omIsPageAddr

#define omIsPageAddr | ( |  | addr | ) |

Value:
((omPageIndicies[omGetPageIndexOfAddr(addr) - omMinPageIndex] & \
(((unsigned long)1) << omGetPageShiftOfAddr(addr))) != 0)
omGetPageShiftOfAddr
#define omGetPageShiftOfAddr(addr)
Definition omBinPage.h:60
omGetPageIndexOfAddr
#define omGetPageIndexOfAddr(addr)
Definition omBinPage.h:63
omMinPageIndex
unsigned long omMinPageIndex
omPageIndicies
unsigned long * omPageIndicies

Definition at line 44 of file omPage.h.

#define omIsPageAddr(addr) \
((omPageIndicies[omGetPageIndexOfAddr(addr) - omMinPageIndex] & \
(((unsigned long)1) << omGetPageShiftOfAddr(addr))) != 0)

## omRegisterExternalAddr

#define omRegisterExternalAddr | ( |  | addr | ) |

Value:
do \
{ \
unsigned long _omPageIndex = omGetPageIndexOfAddr(addr); \
omRegisterPageIndex(_omPageIndex); \
omPageIndicies[_omPageIndex - omMinPageIndex] &= \
~ (((unsigned long) 1) << omGetPageShiftOfAddr(addr)); \
} \
while (0)

Definition at line 63 of file omPage.h.

#define omRegisterExternalAddr(addr) \
do \
{ \
unsigned long _omPageIndex = omGetPageIndexOfAddr(addr); \
omRegisterPageIndex(_omPageIndex); \
omPageIndicies[_omPageIndex - omMinPageIndex] &= \
~ (((unsigned long) 1) << omGetPageShiftOfAddr(addr)); \
} \
while (0)

## omRegisterPageAddr

#define omRegisterPageAddr | ( |  | addr | ) |

Value:
do \
{ \
unsigned long _omPageIndex = omGetPageIndexOfAddr(addr); \
omRegisterPageIndex(_omPageIndex); \
omPageIndicies[_omPageIndex - omMinPageIndex] |= \
(((unsigned long) 1) << omGetPageShiftOfAddr(addr)); \
} \
while (0)

Definition at line 73 of file omPage.h.

#define omRegisterPageAddr(addr) \
do \
{ \
unsigned long _omPageIndex = omGetPageIndexOfAddr(addr); \
omRegisterPageIndex(_omPageIndex); \
omPageIndicies[_omPageIndex - omMinPageIndex] |= \
(((unsigned long) 1) << omGetPageShiftOfAddr(addr)); \
} \
while (0)

## omRegisterPageIndex

#define omRegisterPageIndex | ( |  | index | ) |

Value:
do \
{ \
if (index < omMinPageIndex || index > omMaxPageIndex) \
{ \
omPageIndexFault(index); \
} \
} \
while (0)
omMaxPageIndex
unsigned long omMaxPageIndex
index
static int index(p_Length length, p_Ord ord)
Definition p_Procs_Impl.h:592

Definition at line 53 of file omPage.h.

#define omRegisterPageIndex(index) \
do \
{ \
if (index < omMinPageIndex || index > omMaxPageIndex) \
{ \
omPageIndexFault(index); \
} \
} \
while (0)

## Function Documentation

## omFreePage()

void omFreePage | ( | void * | page | ) |

## omGetNumberOfAllocatedPages()

int omGetNumberOfAllocatedPages | ( |  | ) |

## omGetNumberOfFreePages()

int omGetNumberOfFreePages | ( |  | ) |

## omGetNumberOfUsedPages()

int omGetNumberOfUsedPages | ( |  | ) |

## omGetPage()

void * omGetPage | ( |  | ) |

## omIsAddrOnFreePage()

int omIsAddrOnFreePage | ( | void * | addr | ) |

## omIsAddrOnRegisteredPage()

int omIsAddrOnRegisteredPage | ( | void * | addr | ) |

## omPageIndexFault()

void omPageIndexFault | ( | unsigned long | page_index | ) |

extern

## omReleaseFreePages()

void omReleaseFreePages | ( |  | ) |

## Variable Documentation

## omMaxPageIndex

unsigned long omMaxPageIndex

extern

## omMinPageIndex

unsigned long omMinPageIndex

extern

## omPageIndicies

unsigned long* omPageIndicies

extern