all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Emacs <emacs-devel@gnu.org>
Subject: Why does get_lim_data ignore RLIM_INFINITY?
Date: Tue, 19 Mar 2013 23:03:38 -0400	[thread overview]
Message-ID: <5149270A.9050104@cornell.edu> (raw)

Paul,

I'm puzzled by one of the changes you made to vm-limit.c:get_lim_data() 
in bzr revision 111152.  Specifically, it doesn't seem right to ignore 
RLIM_INFINITY as in the following comment:

+  /* Set LIM_DATA to the minimum of the maximum object size and the
+     maximum address space.  Don't bother to check for values like
+     RLIM_INFINITY since in practice they are not much less than 
SIZE_MAX.  */

According to POSIX, "If a call to getrlimit() returns RLIM_INFINITY for 
a resource, it means the implementation shall not enforce limits on that 
resource."

So I think this fragment of the original code shouldn't have been removed:

if (rlimit.rlim_cur == RLIM_INFINITY)
  lim_data = -1;

Ken



             reply	other threads:[~2013-03-20  3:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  3:03 Ken Brown [this message]
2013-03-20  5:36 ` Why does get_lim_data ignore RLIM_INFINITY? Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5149270A.9050104@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.