ATLAS Offline Software
|
Using the underlying. More...
Public Types | |
typedef std::vector< Entry > | protected_t |
the list of protected pages More... | |
typedef protected_t::const_iterator | const_iterator |
Public Member Functions | |
PageAccessControl (size_t reservedSize=65535) | |
PageAccessControl (procmaps &pmaps, size_t reservedSize=65535) | |
template<typename T > | |
bool | protectPage (T *addr, int prot) |
protect the page containing addr, record the amount of memory we protected NOTE To avoid SEGV, if PROT_WRITE is requested the remainder of the page containing the object at addr will be leaked with malloc before being write-locked More... | |
template<typename T > | |
bool | forbidPage (const T *addr) |
forbid access to the page containing addr, setting its prot to PROT_NONE More... | |
bool | forbidPage (const void *addr, size_t objSize) |
forbid access to the page containing addr, setting its prot to PROT_NONE More... | |
bool | forbidPage (const void *addr) |
FIXME this will not work well for objects spanning across pages. More... | |
bool | protectPage (const void *addr, size_t objSize, int prot) |
void* version of protectPage. Used to implement all others More... | |
bool | restorePageProt (const void *addr) |
void | sort () |
const protected_t & | protectedPtrs () const |
const_iterator | beginProtectedPtrs () const |
const_iterator | endProtectedPtrs () const |
void | reset () |
bool | accessed (const void *address) const |
was the page containing address accessed? More... | |
Private Attributes | |
procmaps | m_pmaps |
the content of /proc/self/maps More... | |
protected_t | m_protected |
bool | m_protectedIsSorted |
Using the underlying.
access to page containing address
typedef protected_t::const_iterator PageAccessControl::const_iterator |
Definition at line 92 of file PageAccessControl.h.
typedef std::vector<Entry> PageAccessControl::protected_t |
the list of protected pages
Definition at line 91 of file PageAccessControl.h.
|
inline |
Definition at line 29 of file PageAccessControl.h.
|
inline |
Definition at line 36 of file PageAccessControl.h.
bool PageAccessControl::accessed | ( | const void * | address | ) | const |
was the page containing address accessed?
Definition at line 118 of file PageAccessControl.cxx.
|
inline |
Definition at line 94 of file PageAccessControl.h.
|
inline |
Definition at line 95 of file PageAccessControl.h.
|
inline |
forbid access to the page containing addr, setting its prot to PROT_NONE
Definition at line 55 of file PageAccessControl.h.
|
inline |
FIXME this will not work well for objects spanning across pages.
Definition at line 65 of file PageAccessControl.h.
|
inline |
forbid access to the page containing addr, setting its prot to PROT_NONE
Definition at line 60 of file PageAccessControl.h.
|
inline |
Definition at line 93 of file PageAccessControl.h.
bool PageAccessControl::protectPage | ( | const void * | addr, |
size_t | objSize, | ||
int | prot | ||
) |
void* version of protectPage. Used to implement all others
Definition at line 56 of file PageAccessControl.cxx.
|
inline |
protect the page containing addr, record the amount of memory we protected NOTE To avoid SEGV, if PROT_WRITE is requested the remainder of the page containing the object at addr will be leaked with malloc before being write-locked
Definition at line 49 of file PageAccessControl.h.
|
inline |
Definition at line 96 of file PageAccessControl.h.
bool PageAccessControl::restorePageProt | ( | const void * | addr | ) |
Definition at line 27 of file PageAccessControl.cxx.
void PageAccessControl::sort | ( | ) |
Definition at line 20 of file PageAccessControl.cxx.
|
private |
the content of /proc/self/maps
Definition at line 104 of file PageAccessControl.h.
|
private |
Definition at line 109 of file PageAccessControl.h.
|
private |
Definition at line 110 of file PageAccessControl.h.