kerneltest/e32test/mmu/freeram.h
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
--- a/kerneltest/e32test/mmu/freeram.h	Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/mmu/freeram.h	Wed Sep 01 12:34:56 2010 +0100
@@ -18,32 +18,16 @@
 #ifndef __FREERAM_H__
 #define __FREERAM_H__
 
-/**
-Get the amount of free RAM in the system in bytes.
-
-This calls the kernel HAL supervisor barrier to ensure that asynchronous cleanup in the supervisor
-happens before the amount of free RAM is measured.
-
-There is also the option to wait for upto a specified timeout for the system to become idle.
-
-@param aIdleTimeoutMs If non-zero, the number of milliseconds to wait for the system to become idle.
-
-@return On sucess returns the amount of free RAM in bytes, KErrTimedOut if the timeout expired
-        without the system becoming idle, or one of the other system-wide error codes.
-*/
-TInt FreeRam(TInt aIdleTimeoutMs = 0)
+//
+// returns the free RAM in bytes
+//
+inline TInt FreeRam()
 	{
 	// wait for any async cleanup in the supervisor to finish first...
-	TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalSupervisorBarrier,
-								  (TAny*)aIdleTimeoutMs, 0);
-	if (r != KErrNone)
-		return r;
+	UserSvr::HalFunction(EHalGroupKernel, EKernelHalSupervisorBarrier, 0, 0);
 
 	TMemoryInfoV1Buf meminfo;
-	r = UserHal::MemoryInfo(meminfo);
-	if (r != KErrNone)
-		return r;
-	
+	UserHal::MemoryInfo(meminfo);
 	return meminfo().iFreeRamInBytes;
 	}