GNU bug report logs -
#26952
25.2; repeated buffer insertion (e.g. yank-rectangle) consumes excessive memory (4GB+ for 90MB of text)
Previous Next
Reported by: Francesco Potortì <pot <at> gnu.org>
Date: Tue, 16 May 2017 14:55:01 UTC
Severity: important
Merged with 27498,
31092,
38629
Found in versions 25.1, 25.2
Fixed in version 26.1
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: npostavs <at> users.sourceforge.net
> Cc: 26952 <at> debbugs.gnu.org, pot <at> gnu.org
> Date: Sat, 20 May 2017 13:41:36 -0400
>
> The following simple loop can trigger the issue (I'm now also limiting
> Emacs' memory usage to 1GB with "ulimit -Sv $((1000 * 1024))" so that it
> just throws an out of memory error instead of filling my swap and
> slowing everything down):
>
> (let ((str (make-string 150 ?a)))
> (dotimes (_ (* 600 1000))
> (insert str ?\n)))
>
> I think it might be just an inefficient allocater (or this pattern of
> allocation happens to hit a pathological case for the allocater). The
> master branch is using the 'hybrid' allocater, while emacs-25 is not.
> If I configure 25.2 with REL_ALLOC=yes, then it runs okay. The only
> allocation seems to be from 'enlarge_buffer_text'.
Thanks.
So you are saying that inserting 90MB worth of text into a buffer
makes Emacs 25.2 run out of 1GB of memory, due to inefficiencies of
the malloc implementation? (Here on Windows it produces a 230MB Emacs
session, but the Windows build uses the moral equivalent of mmap for
allocating buffer text.)
Maybe we should release Emacs 25.3 with this single problem fixed?
This bug report was last modified 5 years and 186 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.