equal
deleted
inserted
replaced
132 TPhysAddr& aNewPage, TUint aBlockZoneId, TBool aBlockRest) |
132 TPhysAddr& aNewPage, TUint aBlockZoneId, TBool aBlockRest) |
133 { |
133 { |
134 return KErrNotSupported; |
134 return KErrNotSupported; |
135 } |
135 } |
136 |
136 |
|
137 |
|
138 TInt DMemoryManager::MoveAndAllocPage(DMemoryObject*, SPageInfo*, TZonePageType) |
|
139 { |
|
140 return KErrNotSupported; |
|
141 } |
|
142 |
|
143 |
137 TZonePageType DMemoryManager::PageType() |
144 TZonePageType DMemoryManager::PageType() |
138 {// This should not be invoked on memory managers that do not use the methods |
145 {// This should not be invoked on memory managers that do not use the methods |
139 // AllocPages() and FreePages(). |
146 // AllocPages() and FreePages(). |
140 __NK_ASSERT_DEBUG(0); |
147 __NK_ASSERT_DEBUG(0); |
141 return EPageFixed; |
148 return EPageFixed; |
719 class DMovableMemoryManager : public DUnpagedMemoryManager |
726 class DMovableMemoryManager : public DUnpagedMemoryManager |
720 { |
727 { |
721 public: |
728 public: |
722 // from DMemoryManager... |
729 // from DMemoryManager... |
723 virtual TInt MovePage(DMemoryObject* aMemory, SPageInfo* aOldPageInfo, TPhysAddr& aNewPage, TUint aBlockZoneId, TBool aBlockRest); |
730 virtual TInt MovePage(DMemoryObject* aMemory, SPageInfo* aOldPageInfo, TPhysAddr& aNewPage, TUint aBlockZoneId, TBool aBlockRest); |
|
731 virtual TInt MoveAndAllocPage(DMemoryObject* aMemory, SPageInfo* aPageInfo, TZonePageType aPageType); |
724 virtual TInt HandleFault( DMemoryObject* aMemory, TUint aIndex, DMemoryMapping* aMapping, |
732 virtual TInt HandleFault( DMemoryObject* aMemory, TUint aIndex, DMemoryMapping* aMapping, |
725 TUint aMapInstanceCount, TUint aAccessPermissions); |
733 TUint aMapInstanceCount, TUint aAccessPermissions); |
726 virtual TZonePageType PageType(); |
734 virtual TZonePageType PageType(); |
727 public: |
735 public: |
728 /** |
736 /** |
881 // indicate we've stopped moving memory now... |
889 // indicate we've stopped moving memory now... |
882 MmuLock::Lock(); |
890 MmuLock::Lock(); |
883 RPageArray::MovePageEnd(*movingPageArrayPtr); |
891 RPageArray::MovePageEnd(*movingPageArrayPtr); |
884 MmuLock::Unlock(); |
892 MmuLock::Unlock(); |
885 |
893 |
|
894 return r; |
|
895 } |
|
896 |
|
897 |
|
898 TInt DMovableMemoryManager::MoveAndAllocPage(DMemoryObject* aMemory, SPageInfo* aPageInfo, TZonePageType aPageType) |
|
899 { |
|
900 TPhysAddr newPage; |
|
901 TInt r = MovePage(aMemory, aPageInfo, newPage, KRamZoneInvalidId, EFalse); |
|
902 if (r == KErrNone) |
|
903 { |
|
904 TheMmu.MarkPageAllocated(aPageInfo->PhysAddr(), aPageType); |
|
905 } |
886 return r; |
906 return r; |
887 } |
907 } |
888 |
908 |
889 |
909 |
890 TInt DMovableMemoryManager::HandleFault(DMemoryObject* aMemory, TUint aIndex, DMemoryMapping* aMapping, |
910 TInt DMovableMemoryManager::HandleFault(DMemoryObject* aMemory, TUint aIndex, DMemoryMapping* aMapping, |