From owner-freebsd-bugs Tue Nov 14 1:50: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 60C2E37B479 for ; Tue, 14 Nov 2000 01:50:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA01525; Tue, 14 Nov 2000 01:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Tue, 14 Nov 2000 01:50:02 -0800 (PST) Message-Id: <200011140950.BAA01525@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: kern/22826: Memory limits have no effect in linux compatibility Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/22826; it has been noted by GNATS. From: Bruce Evans To: hanche@math.ntnu.no Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/22826: Memory limits have no effect in linux compatibility Date: Tue, 14 Nov 2000 20:50:20 +1100 (EST) On Mon, 13 Nov 2000 hanche@math.ntnu.no wrote: > >Description: > Memory limits, soft or hard, appear to have no effect on programs > running under Linux emulation, allowing them to allocate memory until > the machine runs out of virtual memory. > >How-To-Repeat: > Set a low memory limit. Soft or hard, it doesn't matter: > $ ulimit -H -m 8192 I think you want to use -d (data segment size) and maybe -s (stack size) instead of -m (max memory size) (better described as max resident set in setrlimit(2)). -m limits use of real memory but doesn't limit use of virtual memory. > Run a linux program which likes to allocate lots of memory, > and watch it grow, and grow, and grow. > I discovered this using acroread 4.05, which has > a marvelous memory leak - when the display covers most of the screen, > it grows by several MB each time you move to a different page. > I had it grow to over 100 MB with a memory limit of just 8 MB. Marvelous indeed. It has (effectively) hung my system a couple of times with earlier versions of acroread4. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message