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#22526: 25.0.90; Crash starting gnus Date: Mon, 15 Feb 2016 05:32:15 +0200 Message-ID: <83si0uy7gg.fsf@gnu.org> References: <56AFD88B.5040904@gmail.com> <87pow9cc0c.fsf@gnus.org> <83h9hkse78.fsf@gnu.org> <864mdk44q6.fsf@gmail.com> <83mvrcqli1.fsf@gnu.org> <86twlg2e69.fsf@gmail.com> <8360xv9ems.fsf@gnu.org> <8637sz7xmh.fsf@gmail.com> <83io1v7xcd.fsf@gnu.org> <83fuwx7vkv.fsf@gnu.org> <86fuwxk1l1.fsf@gmail.com> <837fi96mkq.fsf@gnu.org> <83vb5s6gas.fsf@gnu.org> <83d1s05zov.fsf@gnu.org> <83r3ggz2dt.fsf@gnu.org> <83povzzw5d.fsf@gnu.org> <86egcfs7f4.fsf@gmail.com> <83a8n3z0yb.fsf@gnu.org> <837fi7yyce.fsf@gnu.org> <83twlbx9gp.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1455507206 24160 80.91.229.3 (15 Feb 2016 03:33:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Feb 2016 03:33:26 +0000 (UTC) Cc: 22526@debbugs.gnu.org, andrewjmoreton@gmail.com To: Fabrice Popineau Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 15 04:33:14 2016 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 1aV9uR-000731-8d for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Feb 2016 04:33:11 +0100 Original-Received: from localhost ([::1]:55877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aV9uQ-0003Dc-Lb for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 22:33:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aV9uN-0003DW-6s for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 22:33:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aV9uI-0003fY-7q for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 22:33:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aV9uI-0003fU-4e for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 22:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aV9uH-0003Ph-UY for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 22:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Feb 2016 03:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22526 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22526-submit@debbugs.gnu.org id=B22526.145550714313070 (code B ref 22526); Mon, 15 Feb 2016 03:33:01 +0000 Original-Received: (at 22526) by debbugs.gnu.org; 15 Feb 2016 03:32:23 +0000 Original-Received: from localhost ([127.0.0.1]:39195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aV9tf-0003Ok-7H for submit@debbugs.gnu.org; Sun, 14 Feb 2016 22:32:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33372) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aV9td-0003OW-8h for 22526@debbugs.gnu.org; Sun, 14 Feb 2016 22:32:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aV9tT-0003Zb-4E for 22526@debbugs.gnu.org; Sun, 14 Feb 2016 22:32:16 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aV9tT-0003ZX-1X; Sun, 14 Feb 2016 22:32:11 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4078 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aV9tS-0007Ob-80; Sun, 14 Feb 2016 22:32:10 -0500 In-reply-to: (message from Fabrice Popineau on Sun, 14 Feb 2016 22:41:43 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:113047 Archived-At: > From: Fabrice Popineau > Date: Sun, 14 Feb 2016 22:41:43 +0100 > Cc: andrewjmoreton@gmail.com, 22526@debbugs.gnu.org > > As vmmap shows it, the next region is unusable. > The reserved region is 4k and the 60k after are lost. But we only asked for 800 bytes, which could have been satisfied by those 4KB that were reserved there, no? So why dod the commit fail? > I think it is worth to try that : > > diff --git a/src/w32heap.c b/src/w32heap.c > index 69706a3..db14357 100644 > --- a/src/w32heap.c > +++ b/src/w32heap.c > @@ -641,12 +641,12 @@ mmap_alloc (void **var, size_t nbytes) > advance, and the buffer is enlarged several times as the data is > decompressed on the fly. */ > if (nbytes < MAX_BUFFER_SIZE) > - p = VirtualAlloc (NULL, (nbytes * 2), MEM_RESERVE, PAGE_READWRITE); > + p = VirtualAlloc (NULL, ROUND_UP((nbytes * 2), get_allocation_unit()), MEM_RESERVE, > PAGE_READWRITE); > > /* If it fails, or if the request is above 512MB, try with the > requested size. */ > if (p == NULL) > - p = VirtualAlloc (NULL, nbytes, MEM_RESERVE, PAGE_READWRITE); > + p = VirtualAlloc (NULL, ROUND_UP(nbytes, get_allocation_unit()), MEM_RESERVE, > PAGE_READWRITE); > > if (p != NULL) > { > > because running with it, vmmap shows now : > > Images intégrées 1 > > and you see the 64k block is reserved, the first 4k are commited and the next 60k are usable. > Anyway, it is more correct with this patch than without it. I agree. I will commit something like that soon.