59 TInt Request( TInt aFunction, TAny* a1, TAny* a2 ); |
59 TInt Request( TInt aFunction, TAny* a1, TAny* a2 ); |
60 |
60 |
61 protected: // Capability checks for heap access |
61 protected: // Capability checks for heap access |
62 TDrmMatchType IsDrmThread( DThread& aThread ); |
62 TDrmMatchType IsDrmThread( DThread& aThread ); |
63 |
63 |
64 private: // From MHeapWalkerObserver |
64 protected: // From MHeapWalkerObserver |
65 void HandleHeapWalkInit(); |
65 void HandleHeapWalkInit(); |
66 TBool HandleHeapCell( TInt aCellType, TAny* aCellAddress, TInt aLength, TInt aNestingLevel, TInt aAllocNumber ); |
66 TBool HandleHeapCell( TMemSpyDriverCellType aCellType, TAny* aCellAddress, TInt aLength, TInt aNestingLevel, TInt aAllocNumber ); |
67 |
67 |
68 protected: // Heap utility functions |
68 protected: // Heap utility functions |
69 TInt OpenKernelHeap( RHeapK*& aHeap, DChunk*& aChunk, TDes8* aClientHeapChunkName = NULL ); |
69 TInt OpenKernelHeap( RHeapK*& aHeap, DChunk*& aChunk, TDes8* aClientHeapChunkName = NULL ); |
70 TInt OpenKernelHeap( RMemSpyDriverRHeapKernelInPlace& aHeap, TDes8* aClientHeapChunkName = NULL ); |
|
71 TInt OpenKernelHeap( RMemSpyDriverRHeapKernelFromCopy& aHeap, TDes8* aClientHeapChunkName = NULL ); |
70 TInt OpenKernelHeap( RMemSpyDriverRHeapKernelFromCopy& aHeap, TDes8* aClientHeapChunkName = NULL ); |
72 TInt OpenUserHeap( DThread& aClientThread, TUint aExpectedHeapVTable, RMemSpyDriverRHeapUser& aHeap, DChunk*& aUserHeapChunk, TDes8* aClientHeapChunkName = NULL ); |
71 TInt GetHeapInfoKernel(RMemSpyDriverRHeapBase& aHeap, TMemSpyHeapInfo* aHeapInfo, TDes8* aTransferBuffer); |
73 TBool GetUserHeapHandle( DThread& aThread, RMemSpyDriverRHeapUser& aHeap, TUint aExpectedVTable ); |
|
74 TBool IsDebugKernel(); |
|
75 TBool IsDebugKernel( RMemSpyDriverRHeapKernelInPlace& aHeap ); |
|
76 TInt GetHeapInfoKernel( RMemSpyDriverRHeapBase& aHeap, TBool aIsDebugAllocator, const TDesC8& aChunkName, TMemSpyHeapInfo* aHeapInfo, TDes8* aTransferBuffer ); |
|
77 void PrintHeapInfo( const TMemSpyHeapInfo& aInfo ); |
72 void PrintHeapInfo( const TMemSpyHeapInfo& aInfo ); |
78 |
73 |
79 protected: // Free cells |
|
80 void ReleaseFreeCells(); |
|
81 TInt PrepareFreeCellTransferBuffer(); |
|
82 TInt FetchFreeCells( TDes8* aBufferSink ); |
|
83 TInt CalculateFreeCellBufferSize() const; |
|
84 |
|
85 private: // Data members |
74 private: // Data members |
86 RArray< TMemSpyDriverFreeCell > iFreeCells; |
|
87 |
75 |
88 // Points to stack-based object whilst walking in progress |
76 // Points to stack-based object whilst walking in progress |
89 RMemSpyMemStreamWriter* iStackStream; |
77 RMemSpyMemStreamWriter* iStackStream; |
90 RMemSpyMemStreamWriter* iHeapStream; |
|
91 TInt iFreeCellCount; |
78 TInt iFreeCellCount; |
92 }; |
79 }; |
93 |
80 |
94 |
81 |
95 #endif |
82 #endif |