Navigation Menu

Skip to content

Commit

Permalink
test: limit allocated memory size
Browse files Browse the repository at this point in the history
I prefer RLIMIT_AS.  Java however seems to allocate a large
memory region with mmap(), enlarging its virtual memory size
beyond MAXMEM when the VM starts.
  • Loading branch information
aligrudi committed Oct 20, 2016
1 parent b8159f0 commit c7701ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.c
Expand Up @@ -196,7 +196,7 @@ static int ct_exec(char **argv, char *tdir, char *ipath, char *opath, char *epat
setrlimit(RLIMIT_FSIZE, &rlp);
rlp.rlim_cur = MAXMEM;
rlp.rlim_cur = MAXMEM;
setrlimit(RLIMIT_AS, &rlp);
setrlimit(RLIMIT_DATA, &rlp);
rlp.rlim_cur = MAXPROC;
rlp.rlim_cur = MAXPROC;
setrlimit(RLIMIT_NPROC, &rlp);
Expand Down

0 comments on commit c7701ec

Please sign in to comment.