~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5432b9c
)
dot/profile: Set a memory limit so leaky programs don't case swapdeath.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 4 Aug 2020 20:49:46 +0000
(21:49 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 4 Aug 2020 20:49:46 +0000
(21:49 +0100)
dot/profile
patch
|
blob
|
blame
|
history
diff --git
a/dot/profile
b/dot/profile
index
baa996d
..
fd50a46
100644
(file)
--- a/
dot/profile
+++ b/
dot/profile
@@
-109,6
+109,12
@@
done
###--------------------------------------------------------------------------
### Some other preliminaries.
###--------------------------------------------------------------------------
### Some other preliminaries.
+## Set a per-process memory limit. It's much less common for a process to
+## need a lot of memory for a legitimate reason than for it to be a memory
+## leak or some other bug that's going to cause swap death for no good
+## reason.
+ulimit -Sv $(mdw-conf memory-limit 4194304)
+
## Establish a temporary directory.
case ${TMPDIR+t} in
t) ;;
## Establish a temporary directory.
case ${TMPDIR+t} in
t) ;;