diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/intel_os.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/intel_os.c b/lib/intel_os.c index 2a29cc02..0d4f43da 100644 --- a/lib/intel_os.c +++ b/lib/intel_os.c @@ -98,7 +98,14 @@ intel_get_avail_ram_mb(void) #ifdef HAVE_STRUCT_SYSINFO_TOTALRAM /* Linux */ struct sysinfo sysinf; - int ret; + int fd, ret; + + fd = open("/proc/sys/vm/drop_caches", O_RDWR); + if (fd != -1) { + ret = write(fd, "3", 2); + close(fd); + (void)ret; + } ret = sysinfo(&sysinf); assert(ret == 0); |