summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-07-23 18:35:02 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-07-23 18:36:10 +0100
commit8cb89f7c4cb764a819410e05440cc9dcb9f8df1f (patch)
tree9f38de99b603abe11abdf9da127412f69c6c5bab /lib
parent743dc7997aa9f5210055896940d87c88983dcda6 (diff)
linux: placate drop_caches and pass it a '\n'
Apparently it doesn't have much effect without the newline. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/intel_os.c2
1 files changed, 1 insertions, 1 deletions
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;
}