projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1291ba1
)
add memfill.c
author
Szabolcs Nagy
<nsz@port70.net>
Mon, 3 Mar 2014 08:40:47 +0000
(09:40 +0100)
committer
Szabolcs Nagy
<nsz@port70.net>
Mon, 3 Mar 2014 08:40:47 +0000
(09:40 +0100)
src/common/memfill.c
[new file with mode: 0644]
patch
|
blob
diff --git a/src/common/memfill.c
b/src/common/memfill.c
new file mode 100644
(file)
index 0000000..
2b8f999
--- /dev/null
+++ b/
src/common/memfill.c
@@ -0,0
+1,16
@@
+#include <string.h>
+#include <errno.h>
+#include <sys/resource.h>
+#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;
+}