repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
set_vm_limit.c
blob
30c4b43e0ed27b3882981288aa582669e293f8eb
1
/* Called by pr68078. */
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
#include <sys/time.h>
6
#include <sys/resource.h>
7
8
void
9
set_vm_limit
(
int
vm_limit
)
10
{
11
struct
rlimit rl
= {
vm_limit
,
RLIM_INFINITY
};
12
int
r
;
13
14
r
=
setrlimit
(
RLIMIT_AS
, &
rl
);
15
if
(
r
)
16
{
17
perror
(
"set_vm_limit"
);
18
exit
(
1
);
19
}
20
21
return
;
22
}