memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanHeapBase.cpp
changeset 26 4fde310f06fe
parent 15 ccab7f1f8266
child 30 86a2e675b80a
equal deleted inserted replaced
21:f5d4820de50d 26:4fde310f06fe
   903         kernelHeap = (RHeapK*) kernelHeapChunk->Base();
   903         kernelHeap = (RHeapK*) kernelHeapChunk->Base();
   904 #endif
   904 #endif
   905         // Finalise construction of heap 
   905         // Finalise construction of heap 
   906         if  ( kernelHeap != NULL )
   906         if  ( kernelHeap != NULL )
   907             {
   907             {
   908             TRACE_KH( Kern::Printf( "DMemSpyDriverLogChanHeapBase::OpenKernelHeap - kernelHeap->Base(): 0x%08x, kernelHeapChunk->Base(): 0x%08x", kernelHeap->Base(), kernelHeapChunk->Base() ) );
   908             //TRACE_KH( Kern::Printf( "DMemSpyDriverLogChanHeapBase::OpenKernelHeap - kernelHeap->Base(): 0x%08x, kernelHeapChunk->Base(): 0x%08x", kernelHeap->Base(), kernelHeapChunk->Base() ) );
   909             aHeap = kernelHeap;
   909             aHeap = kernelHeap;
   910             aChunk = kernelHeapChunk;
   910             aChunk = kernelHeapChunk;
   911 
   911 
   912             // Get the chunk name (if the caller asked for it)
   912             // Get the chunk name (if the caller asked for it)
   913             if  ( aClientHeapChunkName )
   913             if  ( aClientHeapChunkName )
  1015                 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));
  1015                 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));
  1016 
  1016 
  1017                 NKern::LockSystem();
  1017                 NKern::LockSystem();
  1018                 const TUint32 copyLength = heapSize; // TODO Min( heap->Size(), heapSize );
  1018                 const TUint32 copyLength = heapSize; // TODO Min( heap->Size(), heapSize );
  1019 
  1019 
  1020                 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() ));
  1020                 //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() ));
  1021                 memcpy( (TUint8*) heapCopyChunkAddress, heap, copyLength );
  1021                 memcpy( (TUint8*) heapCopyChunkAddress, heap, copyLength );
  1022 
  1022 
  1023                 NKern::UnlockSystem();
  1023                 NKern::UnlockSystem();
  1024 
  1024 
  1025                 TRACE_KH( Kern::Printf("DMemSpyDriverLogChanHeapBase::OpenKernelHeap(CP) - copied kernel heap data" ));
  1025                 TRACE_KH( Kern::Printf("DMemSpyDriverLogChanHeapBase::OpenKernelHeap(CP) - copied kernel heap data" ));