881 |
882 |
882 /** |
883 /** |
883 Find and open the mapping that maps a virtual address in the address space of the specified |
884 Find and open the mapping that maps a virtual address in the address space of the specified |
884 process. |
885 process. |
885 |
886 |
|
887 The caller must close the mapping when it has finished using it. |
|
888 |
|
889 @param aProcess The process whose address space is to be searched. |
|
890 @param aAddr The virtual address for which the mapping is to be found. |
|
891 @param aSize The size, in bytes, of the region at aAddr. |
|
892 @param aOffsetInMapping A reference which is set to the offset, in bytes, into the |
|
893 mapping of the start address. |
|
894 @param aInstanceCount The instance count of the found mapping. |
|
895 |
|
896 @return The mapping, or NULL if no mapping was found. |
|
897 |
|
898 @pre Calling thread must be in a critical section. |
|
899 */ |
|
900 static DMemoryMapping* FindMappingInProcess(DMemModelProcess* aProcess, TLinAddr aAddr, TUint aSize, |
|
901 TUint& aOffsetInMapping, TUint& aInstanceCount); |
|
902 |
|
903 /** |
|
904 Find and open the mapping that maps a virtual address in the address space of the specified |
|
905 process. |
|
906 |
886 The caller must close the mapping when it has finished using it. The caller must ensure that |
907 The caller must close the mapping when it has finished using it. The caller must ensure that |
887 the process can't be destroyed while calling this method. |
908 the process can't be destroyed while calling this method. |
888 |
909 |
889 @param aOsAsid The identifier for the address space in which the mapping appears. |
910 @param aOsAsid The identifier for the address space in which the mapping appears. |
890 @param aAddr The virtual address for which the mapping is to be found. |
911 @param aAddr The virtual address for which the mapping is to be found. |
1044 static void AsyncAddressSpaceFree(TUint aOsAsid); |
1065 static void AsyncAddressSpaceFree(TUint aOsAsid); |
1045 static TInt VirtualAllocCommon(TLinAddr& aLinAddr, TUint aSize, TBool aDemandPaged); |
1066 static TInt VirtualAllocCommon(TLinAddr& aLinAddr, TUint aSize, TBool aDemandPaged); |
1046 static void VirtualFreeCommon(TLinAddr aLinAddr, TUint aSize); |
1067 static void VirtualFreeCommon(TLinAddr aLinAddr, TUint aSize); |
1047 static TInt VirtualAlloc(TInt aOsAsid, TLinAddr& aLinAddr, TUint aSize, TBool aDemandPaged); |
1068 static TInt VirtualAlloc(TInt aOsAsid, TLinAddr& aLinAddr, TUint aSize, TBool aDemandPaged); |
1048 static void VirtualFree(TInt aOsAsid, TLinAddr aLinAddr, TUint aSize); |
1069 static void VirtualFree(TInt aOsAsid, TLinAddr aLinAddr, TUint aSize); |
|
1070 |
|
1071 #ifdef _DEBUG |
|
1072 /** |
|
1073 Force a region of paged memory to be paged out. |
|
1074 |
|
1075 If the memory is not paged this call has no effect. |
|
1076 |
|
1077 @return KErrNone, or KErrBadDescriptor if a single mapping containing the region could not be |
|
1078 found. |
|
1079 */ |
|
1080 static TInt FlushRegion(DMemModelProcess*, TLinAddr aStartAddress, TUint aSize); |
|
1081 #endif |
1049 |
1082 |
1050 /** |
1083 /** |
1051 Enumeration of panic values for category "MemModel". |
1084 Enumeration of panic values for category "MemModel". |
1052 */ |
1085 */ |
1053 enum TMemModelPanic |
1086 enum TMemModelPanic |