Date: Tue, 18 Oct 2005 06:30:13 GMT From: Nate Eldredge <nge@cs.hmc.edu> To: emulation@FreeBSD.org Subject: Re: kern/22826: Memory limits have no effect in linux compatibility Message-ID: <200510180630.j9I6UDg7000706@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/22826; it has been noted by GNATS. From: Nate Eldredge <nge@cs.hmc.edu> To: bug-followup@FreeBSD.org, hanche@math.ntnu.no Cc: Subject: Re: kern/22826: Memory limits have no effect in linux compatibility Date: Mon, 17 Oct 2005 23:23:12 -0700 (PDT) The "bug" here is that mmap does not respect the datasize limit (ulimit -d). But this may actually be correct. mmap'ed space is in some sense not part of the "data segment"; at least, it is not necessarily contiguous with the main data segment. I tested Linux and Solaris, and neither one subjects mmap to the datasize limit. The Linux malloc is a little counter-intuitive in that it may use mmap to acquire its memory, thus placing it outside the data segment and beyond the purview of ulimit -d, but I'm not sure I would call this a bug. mmap is subject to the virtual memory limit (ulimit -v) on FreeBSD, as it is on Linux and Solaris as well. So this is probably the right limit to set if you want to restrict how much memory the process can use. Maintainers, consider closing this? -- Nate Eldredge nge@cs.hmc.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510180630.j9I6UDg7000706>
