First public contribution.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 class TLoaderDeletedList
24 TLoaderDeletedList* iNext;
31 NONSHARABLE_CLASS(CReaperCleanupTimer): public CTimer
34 CReaperCleanupTimer();
36 static void Complete();
38 ~CReaperCleanupTimer();
41 static CReaperCleanupTimer* Timer;
44 NONSHARABLE_CLASS(CActiveReaper) : public CActive
47 static CActiveReaper* New();
51 void AddDeleted(TLoaderDeletedList* aLink);
58 virtual void DoCancel();
60 TLoaderDeletedList* iLoaderDeletedList;
63 NONSHARABLE_CLASS(CSlottedChunkAllocator) : public CBase
67 TAny* Alloc(TUint aSize);
68 void Free(TAny* aPtr);
71 // slot size must be multiple of page size
72 enum { KSlots=2, KSlotSize=16777216 };
78 extern CSlottedChunkAllocator gFileDataAllocator;
81 //#define TRACE_CHECK_FAILURES
85 #ifdef TRACE_CHECK_FAILURES
86 static TInt CheckFail(const char* aFile,TUint aLine)
88 RDebug::Printf("\nLoader check failure: %s line %d\n",aFile,aLine);
91 #define CHECK_FAIL CheckFail(__FILE__,__LINE__)
92 #define CHECK_FAILURE(_r) (void)(_r==0 || CHECK_FAIL)
94 #define CHECK_FAIL ((void)0)
95 #define CHECK_FAILURE(_r) ((void)0)
98 #define RETURN_FAILURE(_r) return (CHECK_FAIL,_r)
99 #define LEAVE_FAILURE(_r) User::Leave((CHECK_FAIL,_r))
102 #define TRACE(_t) RDebug::Printf _t
104 #define TRACE(_t) ((void)0)
106 #define E32IMAGEHEADER_TRACE TRACE