|
The Pedigree Project 0.1
|
#include <MemoryMappedFile.h>
Inheritance diagram for MemoryMapManager:
Collaboration diagram for MemoryMapManager:Classes | |
| class | LockPlan |
| class | OperationGuard |
| class | PreparedFileResize |
| struct | RemapRequest |
Public Types | |
| enum class | Placement { Hint , FixedReplace , FixedNoReplace } |
| enum class | MapStatus { Success , NoMemory , AddressInUse , PolicyDenied , TextBusy , LockLimit } |
| enum class | VmStatus { Success , InvalidRange , Unmapped , Unsupported , NoMemory , LockLimit } |
| enum class | FileRemapStatus { Success , InvalidRange , Unsupported , NoMemory , PolicyDenied , LockLimit , PermissionDenied } |
| enum class | UserPageCopyStatus { Success , Inaccessible , NoMemory , IoError , Unsupported } |
| enum class | ProtectStatus { Success , Unmapped , AccessDenied , InvalidRange , Unsupported , NoMemory , TextBusy } |
| enum class | FaultResolution { Unhandled , Resolved , BackingFault } |
| enum class | ResizeStatus { Ready , NoMemory , Unsupported , Invalid } |
Public Member Functions | |
| FileRemapStatus | remapFilePages (uintptr_t base, size_t length, size_t byteOffset, bool nonblock) |
| VmStatus | remap (const RemapRequest &request, uintptr_t &result) |
| VmStatus | residency (uintptr_t base, size_t length, unsigned char *kernelVector, FileResidencyAccess access, void *credentials) |
| VmStatus | discard (uintptr_t base, size_t length) |
| UserPageCopyStatus | copyUserPage (VirtualAddressSpace &space, uintptr_t userAddress, void *kernelBuffer, size_t bytes, bool write) |
| PopulationStatus | populateMemory (VirtualAddressSpace &space, uintptr_t base, size_t length) |
| void | bindMemoryLockPolicy (VirtualAddressSpace &space) |
| MemoryLockStatus | lockMemory (VirtualAddressSpace &space, uintptr_t base, size_t length, MemoryLockMode mode, bool privileged) |
| MemoryLockStatus | lockAllMemory (VirtualAddressSpace &space, bool current, MemoryLockMode currentMode, MemoryLockMode futureMode, bool privileged) |
| bool | hasLockedMemory (VirtualAddressSpace &space, uintptr_t base, size_t length) |
| MemoryMappedObject * | mapFile (File *pFile, uintptr_t &address, size_t length, MemoryMappedObject::Permissions perms, size_t offset=0, bool bCopyOnWrite=true) |
| bool | hasSharedWriteCapability (File *backing) |
| MemoryMappedObject * | mapFile (File *pFile, uintptr_t &address, size_t length, MemoryMappedObject::Permissions perms, size_t offset, bool bCopyOnWrite, Placement placement, MapStatus *status, MemoryMappedObject::Permissions maximumPerms=MemoryMappedObject::Read|MemoryMappedObject::Write|MemoryMappedObject::Exec, const SharedPointer< MappingAttachment > &attachment=SharedPointer< MappingAttachment >(), MemoryLockMode requestedLock=MemoryLockMode::None, const FileMappingOrigin &origin={}) |
| MemoryMappedObject * | mapAnon (uintptr_t &address, size_t length, MemoryMappedObject::Permissions perms) |
| MemoryMappedObject * | mapAnon (uintptr_t &address, size_t length, MemoryMappedObject::Permissions perms, Placement placement, MapStatus *status, MemoryLockMode requestedLock=MemoryLockMode::None) |
| bool | clone (Process *pTarget) |
| SwapStatus | pageOutRange (uintptr_t base, size_t length) |
| SwapStatus | activateSwap (uint32_t endpoint) |
| SwapStatus | deactivateSwap (uint32_t endpoint) |
| SwapSnapshot | swapSnapshot () |
| bool | operationOwnedByCurrentExecution () |
| size_t | remove (uintptr_t base, size_t length) |
| size_t | removeAndRelease (uintptr_t base, size_t length, VmStatus *status=nullptr) |
| SharedPointer< MappingAttachment > | findAttachment (uintptr_t base) |
| size_t | removeAttachment (const SharedPointer< MappingAttachment > &attachment) |
| size_t | setPermissions (uintptr_t base, size_t length, MemoryMappedObject::Permissions perms, ProtectStatus *status=nullptr) |
| bool | contains (uintptr_t base, size_t length) |
| bool | allows (uintptr_t base, size_t length, MemoryMappedObject::Permissions permissions) |
| bool | sharedBacking (Process *process, uintptr_t address, uintptr_t &identity, size_t &offset) |
| bool | faultIn (uintptr_t address, bool write) |
| bool | faultInRange (uintptr_t address, size_t length, bool write) |
| bool | writableAnonymousRange (uintptr_t address, size_t length) |
| FaultResolution | resolveUserFault (uintptr_t address, bool write, bool wasPresent, bool execute) |
| ResizeStatus | prepareFileResize (File *file, size_t oldSize, size_t newSize, UniquePointer< PreparedFileResize > &result) |
| bool | sync (uintptr_t base, size_t length, bool async, int *error=nullptr) |
| void | invalidate (uintptr_t base, size_t length) |
| void | unmap (MemoryMappedObject *pObj) |
| void | unmapAll () |
| virtual bool | trap (InterruptState &state, uintptr_t address, bool bIsWrite, bool bWasPresent) |
| virtual bool | compact () |
| virtual const char * | getMemoryPressureDescription () |
Static Public Member Functions | |
| static MemoryMapManager & | instance () |
Protected Member Functions | |
| void | unmapAllUnlocked () |
| void | acquireLock () |
| void | releaseLock () |
Private Types | |
| enum | Ops { Sync , Invalidate } |
| typedef MappingList< MemoryMappedObject > | MmObjectList |
Private Member Functions | |
| MemoryMapManager () | |
| MemoryLockStatus | prepareManagedLocks (VirtualAddressSpace &space, uintptr_t base, size_t length, MemoryLockMode mode, bool all, UniquePointer< PreparedMemoryLock > &result) |
| MemoryMappedObject * | publishMapping (File *file, uintptr_t &address, size_t length, MemoryMappedObject::Permissions perms, size_t offset, bool copyOnWrite, Placement placement, MapStatus *status, MemoryMappedObject::Permissions maximumPerms, const SharedPointer< MappingAttachment > &attachment, MemoryLockMode requestedLock, const FileMappingOrigin &origin={}) |
| void | retireLockedPages (VirtualAddressSpace &space, size_t pages) |
| void | enterOperation () |
| bool | tryEnterOperation () |
| void | leaveOperation () |
| size_t | removeInternal (uintptr_t base, size_t length, bool releaseReservations, VmStatus *status=nullptr) |
| void | releaseReservation (Process *process, VirtualAddressSpace &addressSpace, uintptr_t base, size_t length) |
| bool | faultInUnlocked (uintptr_t address, bool write, MemoryMappedObject *&selected, bool residentAnonymousOnly=false) |
| bool | accessRange (uintptr_t address, size_t length, bool write, bool residentAnonymousOnly) |
| bool | handleTrapUnlocked (uintptr_t address, bool bIsWrite, bool bWasPresent, bool execute, MemoryMappedObject *selected) |
| bool | handleTrap (uintptr_t address, bool bIsWrite, bool bWasPresent, bool execute=false, MemoryMappedObject *selected=nullptr) |
| bool | op (Ops what, uintptr_t base, size_t length, bool async) |
Private Attributes | |
| Tree< VirtualAddressSpace *, MmObjectList * > | m_MmObjectLists |
| Spinlock | m_Lock |
| Mutex | m_LifecycleLock |
| Spinlock | m_LifecycleStateLock |
| void * | m_pLifecycleOwner |
| size_t | m_LifecycleDepth |
Static Private Attributes | |
| static MemoryMapManager | m_Instance |
Friends | |
| class | PosixSubsystem |
| class | VfsUserMemoryPolicy |
This class is a multiplexing trap handler, to handle traps for MemoryMappedObjects, dispatching them to the right place.
Definition at line 559 of file MemoryMappedFile.h.
|
private |
Definition at line 888 of file MemoryMappedFile.h.
|
strong |
Definition at line 737 of file MemoryMappedFile.h.
|
strong |
Definition at line 580 of file MemoryMappedFile.h.
|
strong |
Definition at line 570 of file MemoryMappedFile.h.
|
private |
Definition at line 878 of file MemoryMappedFile.h.
|
strong |
Definition at line 564 of file MemoryMappedFile.h.
|
strong |
Adjusts permissions across the given range, crossing object boundaries if necessary.
Definition at line 702 of file MemoryMappedFile.h.
|
strong |
Definition at line 740 of file MemoryMappedFile.h.
|
strong |
Definition at line 600 of file MemoryMappedFile.h.
|
strong |
Definition at line 579 of file MemoryMappedFile.h.
|
private |
Default and only constructor. Registers with PageFaultHandler.
Definition at line 803 of file MemoryMappedFile.cc.
References PageFaultHandler::instance(), PageFaultHandler::registerHandler(), and MemoryPressureManager::registerHandler().
|
private |
Definition at line 891 of file MemoryMappedFile.cc.
|
private |
Definition at line 1442 of file MemoryMappedFile.cc.
|
protected |
Acquire the manager's operation gate.
Take this before becoming unscheduleable when a caller needs to invoke unmapAllUnlocked. Contention sleeps through the operation barrier rather than spinning until the gate becomes available.
Definition at line 1789 of file MemoryMappedFile.cc.
Referenced by PosixSubsystem::~PosixSubsystem().
Here is the caller graph for this function:| SwapStatus MemoryMapManager::activateSwap | ( | uint32_t | endpoint | ) |
Definition at line 8 of file MemoryMappedFile-swap.cc.
| bool MemoryMapManager::allows | ( | uintptr_t | base, |
| size_t | length, | ||
| MemoryMappedObject::Permissions | permissions | ||
| ) |
Returns true if memory-map objects cover the full range with all of the requested permissions.
Definition at line 1207 of file MemoryMappedFile.cc.
References MemoryMappedObject::address(), PhysicalMemoryManager::getPageSize(), Process::getParent(), ProcessorBase::information(), MemoryMappedObject::length(), m_MmObjectLists, and MemoryMappedObject::permissions().
Referenced by sync().
Here is the caller graph for this function:| void MemoryMapManager::bindMemoryLockPolicy | ( | VirtualAddressSpace & | space | ) |
Definition at line 69 of file MemoryMappedFile-lock.cc.
| bool MemoryMapManager::clone | ( | Process * | pTarget | ) |
Registers the current address space's mappings with the target process.
| pTarget | The process to clone into. |
Definition at line 897 of file MemoryMappedFile.cc.
References MemoryMappedObject::address(), MemoryMappedObject::clone(), SharedPointer< T >::get(), Process::getAddressSpace(), ProcessorBase::information(), Tree< K, E >::insert(), Tree< K, E >::lookup(), m_MmObjectLists, and MappingList< Object >::reserveBack().
|
virtual |
Trigger a compact in all address spaces.
This may switch in and out of several address spaces.
Implements MemoryPressureHandler.
Definition at line 1722 of file MemoryMappedFile.cc.
References ProcessorBase::information(), m_MmObjectLists, and ProcessorBase::switchAddressSpace().
| bool MemoryMapManager::contains | ( | uintptr_t | base, |
| size_t | length | ||
| ) |
Returns true if at least one memory mapped object is in the range given, false otherwise.
Definition at line 1183 of file MemoryMappedFile.cc.
References PhysicalMemoryManager::getPageSize(), ProcessorBase::information(), m_MmObjectLists, and MemoryMappedObject::matches().
| MemoryMapManager::UserPageCopyStatus MemoryMapManager::copyUserPage | ( | VirtualAddressSpace & | space, |
| uintptr_t | userAddress, | ||
| void * | kernelBuffer, | ||
| size_t | bytes, | ||
| bool | write | ||
| ) |
Definition at line 10 of file MemoryMappedFile-usercopy.cc.
| SwapStatus MemoryMapManager::deactivateSwap | ( | uint32_t | endpoint | ) |
Definition at line 12 of file MemoryMappedFile-swap.cc.
| MemoryMapManager::VmStatus MemoryMapManager::discard | ( | uintptr_t | base, |
| size_t | length | ||
| ) |
Definition at line 118 of file MemoryMappedFile-advice.cc.
|
private |
Definition at line 815 of file MemoryMappedFile.cc.
| bool MemoryMapManager::faultIn | ( | uintptr_t | address, |
| bool | write | ||
| ) |
Definition at line 1428 of file MemoryMappedFile.cc.
| bool MemoryMapManager::faultInRange | ( | uintptr_t | address, |
| size_t | length, | ||
| bool | write | ||
| ) |
Fault in and validate every page touched by a byte range.
Definition at line 1434 of file MemoryMappedFile.cc.
|
private |
Definition at line 1350 of file MemoryMappedFile.cc.
| SharedPointer< MappingAttachment > MemoryMapManager::findAttachment | ( | uintptr_t | base | ) |
Find a logical attachment even when its first fragment was unmapped.
Definition at line 995 of file MemoryMappedFile.cc.
References MemoryMappedObject::address(), ProcessorBase::information(), and m_MmObjectLists.
|
inlinevirtual |
Returns static storage so describing a recovery action cannot itself allocate memory.
Implements MemoryPressureHandler.
Definition at line 793 of file MemoryMappedFile.h.
|
private |
Definition at line 1616 of file MemoryMappedFile.cc.
|
private |
Definition at line 1626 of file MemoryMappedFile.cc.
| bool MemoryMapManager::hasLockedMemory | ( | VirtualAddressSpace & | space, |
| uintptr_t | base, | ||
| size_t | length | ||
| ) |
Definition at line 316 of file MemoryMappedFile-lock.cc.
| bool MemoryMapManager::hasSharedWriteCapability | ( | File * | backing | ) |
Retain an outer OperationGuard when using this query before publication.
Definition at line 1707 of file MemoryMappedFile.cc.
References File::futexIdentity(), MemoryMappedObject::m_bCopyOnWrite, and m_MmObjectLists.
|
inlinestatic |
Singleton instance
Definition at line 614 of file MemoryMappedFile.h.
Referenced by PosixSubsystem::checkAddress(), AnonymousMemoryMap::clone(), PosixSubsystem::copyFromUser(), PosixSubsystem::copyToUser(), PosixSubsystem::copyUserString(), PosixSubsystem::exit(), PosixSubsystem::invoke(), PosixSubsystem::loadElf(), DynamicLinker::loadObject(), DynamicLinker::loadProgram(), PosixSubsystem::readCachedFile(), AnonymousMemoryMap::remove(), File::resize(), PosixSubsystem::resolveUserPageFault(), AnonymousMemoryMap::setPermissions(), PosixSubsystem::setProcess(), AnonymousMemoryMap::split(), AnonymousMemoryMap::stageSlice(), AnonymousMemoryMap::trap(), AnonymousMemoryMap::unmap(), and PosixSubsystem::~PosixSubsystem().
Here is the caller graph for this function:| void MemoryMapManager::invalidate | ( | uintptr_t | base, |
| size_t | length | ||
| ) |
Invalidates backing-cache state where required by the mapping.
Definition at line 1564 of file MemoryMappedFile.cc.
|
private |
Definition at line 874 of file MemoryMappedFile.cc.
| MemoryLockStatus MemoryMapManager::lockAllMemory | ( | VirtualAddressSpace & | space, |
| bool | current, | ||
| MemoryLockMode | currentMode, | ||
| MemoryLockMode | futureMode, | ||
| bool | privileged | ||
| ) |
Definition at line 276 of file MemoryMappedFile-lock.cc.
| MemoryLockStatus MemoryMapManager::lockMemory | ( | VirtualAddressSpace & | space, |
| uintptr_t | base, | ||
| size_t | length, | ||
| MemoryLockMode | mode, | ||
| bool | privileged | ||
| ) |
Definition at line 234 of file MemoryMappedFile-lock.cc.
| MemoryMappedObject * MemoryMapManager::mapAnon | ( | uintptr_t & | address, |
| size_t | length, | ||
| MemoryMappedObject::Permissions | perms | ||
| ) |
Create a new anonymous memory mapping.
Definition at line 193 of file MemoryMappedFile-map.cc.
References mapAnon().
Referenced by PosixSubsystem::invoke(), and mapAnon().
Here is the caller graph for this function:| MemoryMappedObject * MemoryMapManager::mapAnon | ( | uintptr_t & | address, |
| size_t | length, | ||
| MemoryMappedObject::Permissions | perms, | ||
| Placement | placement, | ||
| MapStatus * | status, | ||
| MemoryLockMode | requestedLock = MemoryLockMode::None |
||
| ) |
Definition at line 197 of file MemoryMappedFile-map.cc.
| MemoryMappedObject * MemoryMapManager::mapFile | ( | File * | pFile, |
| uintptr_t & | address, | ||
| size_t | length, | ||
| MemoryMappedObject::Permissions | perms, | ||
| size_t | offset, | ||
| bool | bCopyOnWrite, | ||
| Placement | placement, | ||
| MapStatus * | status, | ||
| MemoryMappedObject::Permissions | maximumPerms = MemoryMappedObject::Read | MemoryMappedObject::Write | MemoryMappedObject::Exec, |
||
| const SharedPointer< MappingAttachment > & | attachment = SharedPointer<MappingAttachment>(), |
||
| MemoryLockMode | requestedLock = MemoryLockMode::None, |
||
| const FileMappingOrigin & | origin = {} |
||
| ) |
Definition at line 173 of file MemoryMappedFile-map.cc.
| MemoryMappedObject * MemoryMapManager::mapFile | ( | File * | pFile, |
| uintptr_t & | address, | ||
| size_t | length, | ||
| MemoryMappedObject::Permissions | perms, | ||
| size_t | offset = 0, |
||
| bool | bCopyOnWrite = true |
||
| ) |
Map in the given File.
Definition at line 167 of file MemoryMappedFile-map.cc.
References mapFile().
Referenced by DynamicLinker::loadObject(), DynamicLinker::loadProgram(), and mapFile().
Here is the caller graph for this function:
|
private |
Definition at line 1270 of file MemoryMappedFile.cc.
| bool MemoryMapManager::operationOwnedByCurrentExecution | ( | ) |
Definition at line 869 of file MemoryMappedFile.cc.
| SwapStatus MemoryMapManager::pageOutRange | ( | uintptr_t | base, |
| size_t | length | ||
| ) |
Definition at line 37 of file MemoryMappedFile-swap.cc.
| PopulationStatus MemoryMapManager::populateMemory | ( | VirtualAddressSpace & | space, |
| uintptr_t | base, | ||
| size_t | length | ||
| ) |
Definition at line 341 of file MemoryMappedFile-lock.cc.
| MemoryMapManager::ResizeStatus MemoryMapManager::prepareFileResize | ( | File * | file, |
| size_t | oldSize, | ||
| size_t | newSize, | ||
| UniquePointer< PreparedFileResize > & | result | ||
| ) |
Caller retains writer, operation and backing-data locks through planning, backend/cache preparation and commit. Preparation does not alter PTEs.
Definition at line 56 of file MemoryMappedFile-resize.cc.
References UniquePointer< T >::adopt(), Tree< K, E >::begin(), Tree< K, E >::count(), Tree< K, E >::end(), File::futexIdentity(), TargetInfo::getPageSize(), Tree< K, E >::lookup(), m_MmObjectLists, and Tree< K, E >::tryInsert().
Referenced by File::resize().
Here is the caller graph for this function:
|
private |
Definition at line 181 of file MemoryMappedFile-lock.cc.
|
private |
Definition at line 208 of file MemoryMappedFile-map.cc.
|
protected |
Release the manager's operation gate.
Definition at line 1793 of file MemoryMappedFile.cc.
Referenced by PosixSubsystem::~PosixSubsystem().
Here is the caller graph for this function:
|
private |
Definition at line 1042 of file MemoryMappedFile.cc.
| MemoryMapManager::VmStatus MemoryMapManager::remap | ( | const RemapRequest & | request, |
| uintptr_t & | result | ||
| ) |
Definition at line 117 of file MemoryMappedFile-remap.cc.
| MemoryMapManager::FileRemapStatus MemoryMapManager::remapFilePages | ( | uintptr_t | base, |
| size_t | length, | ||
| size_t | byteOffset, | ||
| bool | nonblock | ||
| ) |
Definition at line 11 of file MemoryMappedFile-rebias.cc.
| size_t MemoryMapManager::remove | ( | uintptr_t | base, |
| size_t | length | ||
| ) |
Removes the given range from whatever objects might own them, and will cross object boundaries if necessary.
If this will result in a MemoryMappedObject being completely unmapped, it will be removed.
Definition at line 941 of file MemoryMappedFile.cc.
| size_t MemoryMapManager::removeAndRelease | ( | uintptr_t | base, |
| size_t | length, | ||
| VmStatus * | status = nullptr |
||
| ) |
Removes mappings and returns their virtual-address reservations to the current process. Unmapped holes in the requested range are left alone.
This is the munmap path. MAP_FIXED replacement uses remove() so that the replacement inherits the reservations of the mappings it displaces.
Definition at line 945 of file MemoryMappedFile.cc.
References PhysicalMemoryManager::getPageSize(), Process::getParent(), ProcessorBase::information(), and RawUserMemory::prepareReplacement().
| size_t MemoryMapManager::removeAttachment | ( | const SharedPointer< MappingAttachment > & | attachment | ) |
Remove only this attachment's fragments, preserving replacement mappings.
Definition at line 1013 of file MemoryMappedFile.cc.
References MemoryMappedObject::address(), PhysicalMemoryManager::getPageSize(), Process::getParent(), ProcessorBase::information(), and m_MmObjectLists.
|
private |
Definition at line 421 of file MemoryMappedFile-map.cc.
| MemoryMapManager::VmStatus MemoryMapManager::residency | ( | uintptr_t | base, |
| size_t | length, | ||
| unsigned char * | kernelVector, | ||
| FileResidencyAccess | access, | ||
| void * | credentials | ||
| ) |
Definition at line 88 of file MemoryMappedFile-advice.cc.
| MemoryMapManager::FaultResolution MemoryMapManager::resolveUserFault | ( | uintptr_t | address, |
| bool | write, | ||
| bool | wasPresent, | ||
| bool | execute | ||
| ) |
Definition at line 1477 of file MemoryMappedFile.cc.
|
private |
Definition at line 331 of file MemoryMappedFile-lock.cc.
| size_t MemoryMapManager::setPermissions | ( | uintptr_t | base, |
| size_t | length, | ||
| MemoryMappedObject::Permissions | perms, | ||
| ProtectStatus * | status = nullptr |
||
| ) |
Definition at line 1064 of file MemoryMappedFile.cc.
| bool MemoryMapManager::sharedBacking | ( | Process * | process, |
| uintptr_t | address, | ||
| uintptr_t & | identity, | ||
| size_t & | offset | ||
| ) |
Definition at line 1336 of file MemoryMappedFile.cc.
| SwapSnapshot MemoryMapManager::swapSnapshot | ( | ) |
Definition at line 32 of file MemoryMappedFile-swap.cc.
| bool MemoryMapManager::sync | ( | uintptr_t | base, |
| size_t | length, | ||
| bool | async, | ||
| int * | error = nullptr |
||
| ) |
Syncs memory mapped objects within the given range back to their backing store, if they have one.
Definition at line 1316 of file MemoryMappedFile.cc.
References allows(), and PhysicalMemoryManager::getPageSize().
|
virtual |
Trap handler, called when a fault takes place.
Implements MemoryTrapHandler.
Definition at line 1601 of file MemoryMappedFile.cc.
|
private |
Definition at line 847 of file MemoryMappedFile.cc.
| void MemoryMapManager::unmap | ( | MemoryMappedObject * | pObj | ) |
Removes the mappings for the given object from the address space.
Definition at line 1568 of file MemoryMappedFile.cc.
References PhysicalMemoryManager::getPageSize(), ProcessorBase::information(), MemoryMappedObject::length(), and m_MmObjectLists.
Referenced by DynamicLinker::loadObject(), and DynamicLinker::loadProgram().
Here is the caller graph for this function:| void MemoryMapManager::unmapAll | ( | ) |
Removes all mappings from this address space.
Definition at line 1595 of file MemoryMappedFile.cc.
References unmapAllUnlocked().
Referenced by PosixSubsystem::exit(), and PosixSubsystem::invoke().
Here is the caller graph for this function:
|
protected |
Removes all mappings from the address space, unlocked.
Requires callers to have acquired the lock by other means.
Definition at line 1760 of file MemoryMappedFile.cc.
References PhysicalMemoryManager::getPageSize(), ProcessorBase::information(), MemoryMappedObject::length(), and m_MmObjectLists.
Referenced by unmapAll(), and PosixSubsystem::~PosixSubsystem().
Here is the caller graph for this function:| bool MemoryMapManager::writableAnonymousRange | ( | uintptr_t | address, |
| size_t | length | ||
| ) |
Nonfaulting check for resident, writable anonymous pages. Retain an OperationGuard while using the result; file-backed and unmanaged mappings are excluded so a destination cannot alias file cache storage.
Definition at line 1438 of file MemoryMappedFile.cc.
Referenced by PosixSubsystem::readCachedFile().
Here is the caller graph for this function:
|
friend |
Definition at line 560 of file MemoryMappedFile.h.
|
friend |
Definition at line 561 of file MemoryMappedFile.h.
|
staticprivate |
Singleton instance.
Definition at line 886 of file MemoryMappedFile.h.
|
private |
Definition at line 906 of file MemoryMappedFile.h.
|
private |
Keeps the object-list topology and object lifetimes stable while an operation is running without holding m_Lock across object callbacks.
Definition at line 900 of file MemoryMappedFile.h.
|
private |
Protects recursive lifecycle-gate ownership metadata.
Definition at line 903 of file MemoryMappedFile.h.
|
private |
Lock for the cache.
Definition at line 894 of file MemoryMappedFile.h.
|
private |
Cache of virtual address spaces -> MmObjectLists.
Definition at line 891 of file MemoryMappedFile.h.
Referenced by allows(), clone(), compact(), contains(), findAttachment(), hasSharedWriteCapability(), prepareFileResize(), removeAttachment(), unmap(), and unmapAllUnlocked().
|
private |
Definition at line 905 of file MemoryMappedFile.h.