title: How to flush the CPU cache in Linux from a C program?
body: <p>I am writing a C program in which I need to flush my memory. I would like know if there is any UNIX system command to flush the CPU cache.</p>
  
  <p>This is a requirement for my project which involves calculating the time taken for my logic.</p>
  
  <p>I have read about the <code>cacheflush(char *s, int a, int b)</code> function but I am not sure as to whether it will be suitable and what to pass in the parameters.</p>