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>
This commit is contained in:
Chris Wilson 2014-07-23 18:35:02 +01:00
parent 743dc7997a
commit 8cb89f7c4c

View File

@ -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;
}