PageAccessControl Class Reference
List of all members.
Classes |
class | Entry |
| protection of a memory region (see mprotect(2)) More...
|
Public Types |
typedef std::vector< Entry > | protected_t |
| the list of protected pages
|
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) |
template<typename T > |
bool | forbidPage (const T *addr) |
| forbid access to the page containing addr, setting its prot to PROT_NONE
|
bool | forbidPage (const void *addr, size_t objSize) |
| forbid access to the page containing addr, setting its prot to PROT_NONE
|
bool | forbidPage (const void *addr) |
| FIXME this will not work well for objects spanning across pages.
|
bool | protectPage (const void *addr, size_t objSize, int prot) |
| void* version of protectPage. Used to implement all others
|
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?
|
Member Function Documentation
template<typename T >
bool PageAccessControl::protectPage |
( |
T * |
addr, |
|
|
int |
prot | |
|
) |
| | [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
The documentation for this class was generated from the following files:
- /cvmfs/atlas.cern.ch/repo/sw/ASG/AnalysisBase/2.4.30/CxxUtils/CxxUtils/PageAccessControl.h
- /cvmfs/atlas.cern.ch/repo/sw/ASG/AnalysisBase/2.4.30/CxxUtils/Root/PageAccessControl.cxx