From 8cb89f7c4cb764a819410e05440cc9dcb9f8df1f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 23 Jul 2014 18:35:02 +0100 Subject: linux: placate drop_caches and pass it a '\n' Apparently it doesn't have much effect without the newline. Signed-off-by: Chris Wilson --- lib/intel_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/intel_os.c') diff --git a/lib/intel_os.c b/lib/intel_os.c index 0d4f43da..4194744a 100644 --- a/lib/intel_os.c +++ b/lib/intel_os.c @@ -102,7 +102,7 @@ intel_get_avail_ram_mb(void) fd = open("/proc/sys/vm/drop_caches", O_RDWR); if (fd != -1) { - ret = write(fd, "3", 2); + ret = write(fd, "3\n", 2); close(fd); (void)ret; } -- cgit v1.2.3