equal
deleted
inserted
replaced
440 #CleanSomePages. |
440 #CleanSomePages. |
441 |
441 |
442 If the oldest page is on any other list (i.e. is an old or young page) this will steal it, |
442 If the oldest page is on any other list (i.e. is an old or young page) this will steal it, |
443 aquiring the page cleaning mutex first if it is dirty. |
443 aquiring the page cleaning mutex first if it is dirty. |
444 |
444 |
445 Called from #PageInAllocPage and #TryReturnOldestPageToSystem. |
445 Called from #PageInAllocPage, #TryReturnOldestPageToSystem, #AllowAddFreePage and |
|
446 #AllowAddFreePages. |
446 |
447 |
447 @param aAllowAlloc Indicates whether the method should try to allocate a page from the system |
448 @param aAllowAlloc Indicates whether the method should try to allocate a page from the system |
448 |
449 |
449 @return KErrNone on success, KErrInUse if stealing failed or 1 to indicate the the oldest page |
450 @return KErrNone on success, KErrInUse if stealing failed or 1 to indicate the the oldest page |
450 was dirty and the PageCleaning mutex was not held. |
451 was dirty and the PageCleaning mutex was not held. |
500 |
501 |
501 @pre RamAllocLock held. |
502 @pre RamAllocLock held. |
502 */ |
503 */ |
503 TBool TryReturnOldestPageToSystem(); |
504 TBool TryReturnOldestPageToSystem(); |
504 |
505 |
|
506 /** |
|
507 Ensure adding a page to the paging cache will be within the maximum size. |
|
508 |
|
509 @param aPageInfo On return this is set to the SPageInfo of a page that must be returned |
|
510 to the system before a page can be added to the paging cache, or |
|
511 NULL if no page must be returned to the system. |
|
512 */ |
|
513 void AllowAddFreePage(SPageInfo*& aPageInfo); |
|
514 |
|
515 /** |
|
516 Ensure adding aNumPages pages to the paging cache will be within the maximum size. |
|
517 |
|
518 @param aPageInfo On return this is set to the SPageInfo of a page that must be returned |
|
519 to the system before any more pages can be added to the paging cache, or |
|
520 NULL if no page must be returned to the system. |
|
521 @param aNumPages The number of pages the caller wishes to add to the paging cache. |
|
522 |
|
523 @return If aPageInfo == NULL on return, this is the number of pages it is possible to |
|
524 add to the paging cache or 1 if aPageInfo != NULL, i.e. a page will need |
|
525 to be returned to the system. |
|
526 */ |
|
527 TUint AllowAddFreePages(SPageInfo*& aPageInfo, TUint aNumPages); |
|
528 |
505 /** |
529 /** |
506 Put a specific page back on the system's free pool. |
530 Put a specific page back on the system's free pool. |
507 |
531 |
508 @pre RamAllocLock held. |
532 @pre RamAllocLock held. |
509 */ |
533 */ |