The Pedigree Project 0.1
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
RawUserMemory Class Reference

#include <UserMemoryPolicy.h>

+ Collaboration diagram for RawUserMemory:

Classes

class  Plan
 
struct  State
 

Public Member Functions

 RawUserMemory (VirtualAddressSpace &space)
 
uint64_t nextRegionId ()
 
bool completeInventory () const
 
void setCompleteInventory (bool complete)
 
bool covers (uintptr_t base, size_t length) const
 
bool hasLockedMemory (uintptr_t base, size_t length) const
 
MemoryLockStatus prepareChange (const UserRegion *previous, const UserRegion *replacement, UniquePointer< PreparedMemoryLock > &result)
 
MemoryLockStatus prepareLocks (uintptr_t base, size_t length, MemoryLockMode mode, UniquePointer< PreparedMemoryLock > &result)
 
MemoryLockStatus prepareAllLocks (MemoryLockMode mode, UniquePointer< PreparedMemoryLock > &result)
 
MemoryLockStatus prepareReplacement (uintptr_t base, size_t length, UniquePointer< PreparedMemoryLock > &result)
 
MemoryLockStatus cloneInto (RawUserMemory &target)
 
size_t retireRegion (uint64_t id)
 
void clear ()
 

Private Member Functions

 NOT_COPYABLE_OR_ASSIGNABLE (RawUserMemory)
 

Private Attributes

VirtualAddressSpacem_Space
 
UniquePointer< Statem_State
 

Detailed Description

Nonowning raw allocation inventory. Core retains physical-page ownership.

Definition at line 123 of file UserMemoryPolicy.h.

Constructor & Destructor Documentation

◆ RawUserMemory()

RawUserMemory::RawUserMemory ( VirtualAddressSpace space)
explicit

Definition at line 186 of file RawUserMemory.cc.

Member Function Documentation

◆ clear()

void RawUserMemory::clear ( )

Definition at line 432 of file RawUserMemory.cc.

◆ cloneInto()

MemoryLockStatus RawUserMemory::cloneInto ( RawUserMemory target)

Definition at line 412 of file RawUserMemory.cc.

◆ completeInventory()

bool RawUserMemory::completeInventory ( ) const

Definition at line 197 of file RawUserMemory.cc.

◆ covers()

bool RawUserMemory::covers ( uintptr_t  base,
size_t  length 
) const

Requires the user-memory operation gate; holes are never inferred from brk.

Definition at line 207 of file RawUserMemory.cc.

◆ hasLockedMemory()

bool RawUserMemory::hasLockedMemory ( uintptr_t  base,
size_t  length 
) const

Definition at line 224 of file RawUserMemory.cc.

◆ nextRegionId()

uint64_t RawUserMemory::nextRegionId ( )

Definition at line 189 of file RawUserMemory.cc.

◆ prepareAllLocks()

MemoryLockStatus RawUserMemory::prepareAllLocks ( MemoryLockMode  mode,
UniquePointer< PreparedMemoryLock > &  result 
)

Definition at line 387 of file RawUserMemory.cc.

◆ prepareChange()

MemoryLockStatus RawUserMemory::prepareChange ( const UserRegion previous,
const UserRegion replacement,
UniquePointer< PreparedMemoryLock > &  result 
)

Definition at line 235 of file RawUserMemory.cc.

◆ prepareLocks()

MemoryLockStatus RawUserMemory::prepareLocks ( uintptr_t  base,
size_t  length,
MemoryLockMode  mode,
UniquePointer< PreparedMemoryLock > &  result 
)

Definition at line 344 of file RawUserMemory.cc.

◆ prepareReplacement()

MemoryLockStatus RawUserMemory::prepareReplacement ( uintptr_t  base,
size_t  length,
UniquePointer< PreparedMemoryLock > &  result 
)

Keep the user-memory operation gate through commit. Success with no raw overlap clears result and needs no commit; failures leave result unchanged.

Definition at line 300 of file RawUserMemory.cc.

Referenced by MemoryMapManager::removeAndRelease().

+ Here is the caller graph for this function:

◆ retireRegion()

size_t RawUserMemory::retireRegion ( uint64_t  id)

Definition at line 445 of file RawUserMemory.cc.

◆ setCompleteInventory()

void RawUserMemory::setCompleteInventory ( bool  complete)

Definition at line 200 of file RawUserMemory.cc.

Member Data Documentation

◆ m_Space

VirtualAddressSpace& RawUserMemory::m_Space
private

Definition at line 150 of file UserMemoryPolicy.h.

◆ m_State

UniquePointer<State> RawUserMemory::m_State
private

Definition at line 151 of file UserMemoryPolicy.h.


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