kernel/eka/include/memmodel/epoc/mmubase/ramalloc.h
branchRCL_3
changeset 110 c734af59ce98
parent 87 2f92ad2dc5db
child 117 5b5d147c7838
equal deleted inserted replaced
97:41f0cfe18c80 110:c734af59ce98
   140 	void MarkPagesAllocated(TPhysAddr aAddr, TInt aCount, TZonePageType aType);
   140 	void MarkPagesAllocated(TPhysAddr aAddr, TInt aCount, TZonePageType aType);
   141 	TInt FreeRamPage(TPhysAddr aAddr, TZonePageType aType);
   141 	TInt FreeRamPage(TPhysAddr aAddr, TZonePageType aType);
   142 	void FreeRamPages(TPhysAddr* aPageList, TInt aNumPages, TZonePageType aType);
   142 	void FreeRamPages(TPhysAddr* aPageList, TInt aNumPages, TZonePageType aType);
   143 	TInt AllocRamPages(TPhysAddr* aPageList, TInt aNumPages, TZonePageType aType, TUint aBlockedZoneId=KRamZoneInvalidId, TBool aBlockRest=EFalse);
   143 	TInt AllocRamPages(TPhysAddr* aPageList, TInt aNumPages, TZonePageType aType, TUint aBlockedZoneId=KRamZoneInvalidId, TBool aBlockRest=EFalse);
   144 	TInt ZoneAllocRamPages(TUint* aZoneIdList, TUint aZoneIdCount, TPhysAddr* aPageList, TInt aNumPages, TZonePageType aType);
   144 	TInt ZoneAllocRamPages(TUint* aZoneIdList, TUint aZoneIdCount, TPhysAddr* aPageList, TInt aNumPages, TZonePageType aType);
   145 	TInt AllocContiguousRam(TUint aNumPages, TPhysAddr& aPhysAddr, TZonePageType aType, TInt aAlign=0, TUint aBlockZoneId=KRamZoneInvalidId, TBool aBlockRest=EFalse);
   145 	TInt AllocContiguousRam(TUint aNumPages, TPhysAddr& aPhysAddr, TInt aAlign=0);
   146 	TInt ZoneAllocContiguousRam(TUint* aZoneIdList, TUint aZoneIdCount, TInt aSize, TPhysAddr& aPhysAddr, TZonePageType aType, TInt aAlign);
   146 #if !defined(__MEMMODEL_MULTIPLE__) && !defined(__MEMMODEL_MOVING__)
       
   147 	void BlockContiguousRegion(TPhysAddr aAddrBase, TUint aNumPages);
       
   148 	void UnblockSetAllocRuns(TUint& aOffset1, TUint& aOffset2, TUint aRunLength1, TUint aRunLength2, TUint& aAllocLength, TUint& aAllocStart);
       
   149 	void UnblockContiguousRegion(TPhysAddr aAddrBase, TUint aNumPages);
       
   150 	TBool ClearContiguousRegion(TPhysAddr aAddrBase, TPhysAddr aZoneBase, TUint aNumPages, TInt& aOffset);
       
   151 #endif
       
   152 	TInt ZoneAllocContiguousRam(TUint* aZoneIdList, TUint aZoneIdCount, TInt aSize, TPhysAddr& aPhysAddr, TInt aAlign);
   147 #ifdef _DEBUG
   153 #ifdef _DEBUG
   148 	void DebugDump();
   154 	void DebugDump();
   149 #endif
   155 #endif
   150 #ifdef __VERIFY_LEASTMOVDIS
   156 #ifdef __VERIFY_LEASTMOVDIS
   151 	void VerifyLeastPrefMovDis();
   157 	void VerifyLeastPrefMovDis();
   156 	void DoBTracePrime(void);
   162 	void DoBTracePrime(void);
   157 #endif
   163 #endif
   158 	TInt GetZoneAddress(TUint aZoneId, TPhysAddr& aPhysBase, TUint& aNumPages);
   164 	TInt GetZoneAddress(TUint aZoneId, TPhysAddr& aPhysBase, TUint& aNumPages);
   159 	TInt HalFunction(TInt aFunction, TAny* a1, TAny* a2);
   165 	TInt HalFunction(TInt aFunction, TAny* a1, TAny* a2);
   160 	TInt NextAllocatedPage(SZone* aZone, TUint& aOffset, TZonePageType aType) const;
   166 	TInt NextAllocatedPage(SZone* aZone, TUint& aOffset, TZonePageType aType) const;
       
   167 	TInt NextAllocatedRun(SZone* aZone, TUint& aOffset, TUint aEndOffset, TZonePageType aType) const;
   161 	TUint GenDefragFreePages(TZonePageType aType) const;
   168 	TUint GenDefragFreePages(TZonePageType aType) const;
   162 	SZone* GeneralDefragStart0(TGenDefragStage& aStage, TUint& aRequiredToBeDiscarded);
   169 	SZone* GeneralDefragStart0(TGenDefragStage& aStage, TUint& aRequiredToBeDiscarded);
   163 	SZone* GeneralDefragNextZone0();
   170 	SZone* GeneralDefragNextZone0();
   164 	SZone* GeneralDefragStart1();
   171 	SZone* GeneralDefragStart1();
   165 	SZone* GeneralDefragNextZone1();
   172 	SZone* GeneralDefragNextZone1();
   203 	TInt iZoneTmpAddrIndex;				/**< Used by NextAllocZone*/
   210 	TInt iZoneTmpAddrIndex;				/**< Used by NextAllocZone*/
   204 	SDblQueLink* iZoneTmpPrefLink;		/**< Used by NextAllocZone*/
   211 	SDblQueLink* iZoneTmpPrefLink;		/**< Used by NextAllocZone*/
   205 	SDblQueLink* iZoneGeneralPrefLink;	/**< Link to the current RAM zone being defragged*/
   212 	SDblQueLink* iZoneGeneralPrefLink;	/**< Link to the current RAM zone being defragged*/
   206 	SDblQueLink* iZoneGeneralTmpLink;	/**< Link to the current RAM zone being defragged*/
   213 	SDblQueLink* iZoneGeneralTmpLink;	/**< Link to the current RAM zone being defragged*/
   207 	TUint iZoneGeneralStage;			/**< The current stage of any general defrag operation*/
   214 	TUint iZoneGeneralStage;			/**< The current stage of any general defrag operation*/
   208 #ifdef _DEBUG
   215 	TUint iContiguousReserved;			/**< The count of the number of separate contiguous allocations that have reserved pages*/
   209 	TBool iAllowBmaVerify;
   216 	};
   210 #endif
   217 
   211 	};
   218 #endif
   212 
       
   213 #endif