From 2a6e9d9edae6aaf94e643f026cb63774e907cbe6 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 22 Nov 2001 19:22:49 +0000 Subject: newly allocated memory seems to point to only 1 zero filled 4k page or something so there is a near 100% cache hit rate ... not very realistic, writeing something in the source array fixes that so the benchmark scores are meaningfull now git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3077 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/fastmemcpybench.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'TOOLS') diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c index dd153a2b75..adedbb7a57 100644 --- a/TOOLS/fastmemcpybench.c +++ b/TOOLS/fastmemcpybench.c @@ -95,7 +95,7 @@ static inline unsigned long long int read_tsc( void ) return retval; } -unsigned char arr1[ARR_SIZE],arr2[ARR_SIZE]; +unsigned char __attribute__((aligned(4096)))arr1[ARR_SIZE],arr2[ARR_SIZE]; int main( void ) { @@ -107,9 +107,12 @@ int main( void ) mga_init(); marr1 = &frame[3]; #else - marr1 = &arr1[3]; + marr1 = &arr1[0]; #endif - marr2 = &arr2[9]; + marr2 = &arr2[0]; + + for(i=0; i