kerneltest/e32test/defrag/d_pagemove.cpp
changeset 36 538db54a451d
parent 0 a41df078684a
--- a/kerneltest/e32test/defrag/d_pagemove.cpp	Tue Jan 19 13:48:03 2010 +0000
+++ b/kerneltest/e32test/defrag/d_pagemove.cpp	Mon Jan 18 21:31:10 2010 +0200
@@ -42,9 +42,6 @@
 const TInt KMinorVersionNumber=1;
 const TInt KBuildVersionNumber=1;
 
-
-_LIT(KLddName,"PageMove");
-
 class DPageMove;
 
 class DPageMoveFactory : public DLogicalDevice
@@ -104,7 +101,7 @@
 // Install the LDD - overriding pure virtual
 //
     {
-    return SetName(&KLddName);
+    return SetName(&KPageMoveLddName);
     }
 
 void DPageMoveFactory::GetCaps(TDes8& aDes) const
@@ -327,13 +324,18 @@
 	}
 
 
+#ifndef __MSVC6__ 	// VC6 can't cope with variable arguments in macros.
+#define KERN_PRINTF(x...) Kern::Printf(x)
+#endif
+
 //#define EXTRA_TRACE
 #ifdef EXTRA_TRACE
-#define KERN_PRINTF(x...) Kern::Printf(x)
+#define PRINTF(x)	x
 #else
-#define KERN_PRINTF(x...)
+#define PRINTF(x)
 #endif
 
+
 TInt DPageMove::KernelDataMovePerformance(void)
 {
 	const TInt KHeapPagesToMove = 2000;
@@ -364,7 +366,7 @@
 		heapArray[i] = i;
 		}
 
-	KERN_PRINTF("Testing Performance of Moving Kernel Data Pages");
+	PRINTF(KERN_PRINTF("Testing Performance of Moving Kernel Data Pages"));
 
 	TInt moveMode = EKMoveStack;
 	for (; moveMode < EKMoveModes; moveMode++)
@@ -379,14 +381,14 @@
 				baseAddr = pageAddr;
 				endAddr = _ALIGN_UP((TLinAddr)heapArray + heapArraySize, iPageSize);
 				actualHeapPages = (endAddr - baseAddr) / iPageSize;
-				KERN_PRINTF("heap baseAddr %x endAddr %x", baseAddr, endAddr);
+				PRINTF(KERN_PRINTF("heap baseAddr %x endAddr %x", baseAddr, endAddr));
 				break;
 
 			case EKMoveStack:
 				pageAddr = _ALIGN_DOWN((TLinAddr)stackArray, iPageSize);
 				baseAddr = pageAddr;
 				endAddr = _ALIGN_UP((TLinAddr)stackArray + KStackSize, iPageSize);
-				KERN_PRINTF("stack baseAddr %x endAddr %x", baseAddr, endAddr);
+				PRINTF(KERN_PRINTF("stack baseAddr %x endAddr %x", baseAddr, endAddr));
 				break;
 			}