From 2c4e47731be8c23e1b591bada4bdd59ca7524d0a Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Mon, 3 Mar 2014 09:40:47 +0100 Subject: [PATCH] add memfill.c --- src/common/memfill.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/common/memfill.c diff --git a/src/common/memfill.c b/src/common/memfill.c new file mode 100644 index 0000000..2b8f999 --- /dev/null +++ b/src/common/memfill.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include "test.h" + +int t_memfill() +{ + int r = 0; + if (t_vmfill(0,0,0) < 0) { + t_error("vmfill failed: %s\n", strerror(errno)); + r = -1; + } + if (t_setrlim(RLIMIT_DATA, 0) < 0) + r = -1; + return r; +} -- 2.20.1