memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanHeapBase.cpp
branchRCL_3
changeset 18 3406c99bc375
parent 0 a03f92240627
child 20 ca8a1b6995f6
--- a/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanHeapBase.cpp	Mon Jun 21 17:25:56 2010 +0300
+++ b/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanHeapBase.cpp	Thu Jul 15 20:25:38 2010 +0300
@@ -967,7 +967,12 @@
     TRACE_KH( Kern::Printf("DMemSpyDriverLogChanHeapBase::OpenKernelHeap(CP) - open err: %d", r ) );
     if  ( r == KErrNone )
         {
+#ifdef __SYMBIAN_KERNEL_HYBRID_HEAP__
+		// RAllocator::Size() not exported on hybrid heap
+		const TInt heapSize = heap->DebugFunction(RAllocator::EGetSize);
+#else
         const TInt heapSize = heap->Size();
+#endif
         TRACE_KH( Kern::Printf("DMemSpyDriverLogChanHeapBase::OpenKernelHeap(CP) - heapSize: %d, heap: 0x%08x, chunkBase: 0x%08x", heapSize, heap, chunk->Base() ) );
 
         // Make a new chunk that we can copy the kernel heap into. We cannot lock the system the entire time
@@ -1010,7 +1015,7 @@
                 TRACE_KH( Kern::Printf("DMemSpyDriverLogChanHeapBase::OpenKernelHeap(CP) - heapCopyChunk->iSize: 0x%08x, heapCopyChunk->iBase: 0x%08x, heapCopyChunkAddress: 0x%08x, physicalAddress: 0x%08x", heapCopyChunk->iSize, heapCopyChunk->iBase, heapCopyChunkAddress, physicalAddress));
 
                 NKern::LockSystem();
-                const TUint32 copyLength = Min( heap->Size(), heapSize );
+                const TUint32 copyLength = heapSize; // TODO Min( heap->Size(), heapSize );
 
                 TRACE_KH( Kern::Printf("DMemSpyDriverLogChanHeapBase::OpenKernelHeap(CP) - trying to copy %d (vs orig estimate of %d) bytes from kernel allocator address: 0x%08x", copyLength, heapSize, heap->Base() ));
                 memcpy( (TUint8*) heapCopyChunkAddress, heap, copyLength );