all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why does get_lim_data ignore RLIM_INFINITY?
@ 2013-03-20  3:03 Ken Brown
  2013-03-20  5:36 ` Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Brown @ 2013-03-20  3:03 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-20  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20  3:03 Why does get_lim_data ignore RLIM_INFINITY? Ken Brown
2013-03-20  5:36 ` Paul Eggert

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.