Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jun 2003 02:30:12 -0700 (PDT)
From:      David Schultz <das@FreeBSD.ORG>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/53257: malloc() never returns 0
Message-ID:  <200306130930.h5D9UChf034797@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/53257; it has been noted by GNATS.

From: David Schultz <das@FreeBSD.ORG>
To: Tony Gottfridsson <tony@expletus.se>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/53257: malloc() never returns 0
Date: Fri, 13 Jun 2003 02:27:41 -0700

 On Thu, Jun 12, 2003, Tony Gottfridsson wrote:
 > FreeBSD 4.5 malloc() never returns 0 and kills what seems to be
 > random processes, in my case apache seems to be the most likely
 > process to get killed first.
 
 You need to set resource limits on processes whose memory usage
 you wish to bound.  See the 'memoryuse' limit in login.conf(5).
 See also: limit(1) and setrlimit(3).
 
 > This process killing is out of security bounds, ie. normal user
 > malloc()ing forever can kill processes owned by root
 
 The normal behavior is to kill the largest process.  In FreeBSD
 5.1, thanks to Wes, root can designate processes as critical so
 they will not be killed.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306130930.h5D9UChf034797>