From: "Richard M. Stallman" <rms@gnu.org>
Cc: piet@cs.uu.nl, emacs-devel@gnu.org
Subject: Re: Possible memory corruption problem
Date: Tue, 14 Feb 2006 23:39:55 -0500 [thread overview]
Message-ID: <E1F9ESJ-00023i-VK@fencepost.gnu.org> (raw)
In-Reply-To: <17393.41708.76191.538450@parhasard.net> (message from Aidan Kehoe on Tue, 14 Feb 2006 10:29:16 +0100)
Does this change do the job? (Of course, we would put HAVE_GETRLIMIT
under the control of configure.)
*** vm-limit.c 07 Feb 2006 18:13:40 -0500 1.16
--- vm-limit.c 14 Feb 2006 22:57:45 -0500
***************
*** 32,37 ****
--- 32,40 ----
#endif
#include "mem-limits.h"
+ #include <sys/resource.h>
+
+ #define HAVE_GETRLIMIT
/*
Level number of warnings already issued.
***************
*** 61,66 ****
--- 64,82 ----
unsigned long five_percent;
unsigned long data_size;
+ #ifdef HAVE_GETRLIMIT
+ struct rlimit {
+ rlim_t rlim_cur;
+ rlim_t rlim_max;
+ } rlimit;
+
+ getrlimit (RLIMIT_DATA, &rlimit);
+
+ five_percent = rlimit.rlim_max / 20;
+ data_size = rlimit.rlim_cur;
+
+ #else /* not HAVE_GETRLIMIT */
+
if (lim_data == 0)
get_lim_data ();
five_percent = lim_data / 20;
***************
*** 73,78 ****
--- 89,96 ----
#endif
cp = (char *) (*__morecore) (0);
data_size = (char *) cp - (char *) data_space_start;
+
+ #endif /* not HAVE_GETRLIMIT */
if (warn_function)
switch (warnlevel)
next prev parent reply other threads:[~2006-02-15 4:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 15:36 Possible memory corruption problem Piet van Oostrum
2006-02-06 19:13 ` Eli Zaretskii
2006-02-06 22:14 ` Piet van Oostrum
2006-02-13 4:40 ` Richard M. Stallman
2006-02-14 4:35 ` Eli Zaretskii
2006-02-14 7:56 ` Piet van Oostrum
2006-02-14 9:29 ` Aidan Kehoe
2006-02-15 4:39 ` Richard M. Stallman [this message]
2006-02-16 13:21 ` Piet van Oostrum
2006-02-20 18:42 ` Richard M. Stallman
2006-02-14 22:17 ` Richard M. Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1F9ESJ-00023i-VK@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=piet@cs.uu.nl \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).