[igt-dev] [PATCH i-g-t 13/29] lib/igt_core: skip oom_adjustments on non-Linux platforms
D Scott Phillips
d.scott.phillips at intel.com
Wed Dec 11 00:52:19 UTC 2019
oom_adjustments are available only on Linux. Omit the body of
oom_adjust_for_doom on other platforms and just accept whatever
default out-of-memory handling we get.
Signed-off-by: D Scott Phillips <d.scott.phillips at intel.com>
---
lib/igt_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 09d8c159..8df89905 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -672,6 +672,7 @@ static void print_usage(const char *help_str, bool output_on_stderr)
static void oom_adjust_for_doom(void)
{
+#if defined(__linux__)
int fd;
const char always_kill[] = "1000";
@@ -679,7 +680,7 @@ static void oom_adjust_for_doom(void)
igt_assert(fd != -1);
igt_assert(write(fd, always_kill, sizeof(always_kill)) == sizeof(always_kill));
close(fd);
-
+#endif
}
/**
--
2.23.0
More information about the igt-dev
mailing list