From 208f7c752a794798ebbc039d6edd317b0e0f5b12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Mon, 3 Nov 1997 01:38:07 +0100
Subject: [PATCH] Now sets virtual memory ulimit to 64MB to avoid exhausting
 all memory.

Rev: bin/smartlink:1.12
---
 bin/smartlink | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bin/smartlink b/bin/smartlink
index a8f712c455..4c2f494443 100755
--- a/bin/smartlink
+++ b/bin/smartlink
@@ -108,6 +108,11 @@ if test x$# != x0 ; then
   esac
 fi
 
+if test "x$NO_ULIMIT" = "x"; then
+  # Limit virtual memory usage to 64MB.
+  ulimit -v 65536 >/dev/null 2>&1
+fi
+
 # Used to be exec, but Digital-Unix's stupid sh has buggy variable-expansion.
 # /grubba
 eval $LINKER $LDOPTS
-- 
GitLab