From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13783: simplify data_start configuration for Emacs Date: Sat, 23 Feb 2013 12:47:17 +0200 Message-ID: <83bobbl32i.fsf@gnu.org> References: <512729DD.7040903@cs.ucla.edu> <83d2vsmrc0.fsf@gnu.org> <5127DB79.6000202@cs.ucla.edu> <83vc9kkp82.fsf@gnu.org> <51281D0D.4080602@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1361616464 21305 80.91.229.3 (23 Feb 2013 10:47:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Feb 2013 10:47:44 +0000 (UTC) Cc: 13783@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 23 11:48:07 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U9Ce9-0000cp-LH for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2013 11:48:01 +0100 Original-Received: from localhost ([::1]:34510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Cdp-0004Mf-8O for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2013 05:47:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Cdk-0004MR-Tf for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 05:47:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9Cdi-000096-Sd for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 05:47:36 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Cdi-000092-Pe for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 05:47:34 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U9Cf7-0003uF-Qh for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 05:49:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Feb 2013 10:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13783 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13783-submit@debbugs.gnu.org id=B13783.136161654115008 (code B ref 13783); Sat, 23 Feb 2013 10:49:01 +0000 Original-Received: (at 13783) by debbugs.gnu.org; 23 Feb 2013 10:49:01 +0000 Original-Received: from localhost ([127.0.0.1]:45131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9Cf6-0003u1-Pv for submit@debbugs.gnu.org; Sat, 23 Feb 2013 05:49:01 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:45425) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9Cf5-0003tt-1d for 13783@debbugs.gnu.org; Sat, 23 Feb 2013 05:49:00 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MIO008005T6DA00@a-mtaout21.012.net.il> for 13783@debbugs.gnu.org; Sat, 23 Feb 2013 12:47:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MIO008RX5Z6BX30@a-mtaout21.012.net.il>; Sat, 23 Feb 2013 12:47:30 +0200 (IST) In-reply-to: <51281D0D.4080602@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71703 Archived-At: > Date: Fri, 22 Feb 2013 17:36:13 -0800 > From: Paul Eggert > CC: 13783@debbugs.gnu.org > > With the patch, data_start is used only by vm-limit.c. > And vm-limit.c is compiled only when using gmalloc, > as its isn't valid when using a system malloc. > > > It seems like data_start and data_size derived from it matter only > > when displaying memory usage warnings -- is that correct? > > Yes. > > > If so, why doesn't this matter when system malloc is used? > > When the system malloc is used Emacs can't warn about low memory, > because it has no way of knowing when memory is low. I see, thanks. > > The MS-Windows build computes data_start and data_size inside > > unexw32.c at dump time -- is that good enough? (I'm asking because > > your change doesn't touch the Windows build.) > > Yes, it should be, but that points out a problem with the latest > patch -- it should use DATA_START for MS platforms. Here's a further > patch to fix that, and I'm attaching the resulting combined patch, > relative to trunk bzr 111860. Thanks. > --- src/unexcoff.c 2013-01-02 16:13:04 +0000 > +++ src/unexcoff.c 2013-02-22 19:43:17 +0000 > @@ -99,7 +99,7 @@ > > #include > > -#include "mem-limits.h" > +extern int etext[]; > > static long block_copy_start; /* Old executable start point */ > static struct filehdr f_hdr; /* File header */ > @@ -168,7 +168,7 @@ > pagemask = getpagesize () - 1; > > /* Adjust text/data boundary. */ > - data_start = (int) start_of_data (); > + data_start = (int) (etext + 1); I suggest to use DATA_START here (which is defined to '&etext + 1' by msdos/sed2v2.inp).