Peter Ludemann <peter.ludemann@gmail.com> writes:
> I ran a large compilation (to the *compilation* buffer) (232,701 lines,
> 52M).
> In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
> of 2017-09-22, modified by Debian built on lgw01-amd64-050
> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
> System Description: Ubuntu 18.04.3 LTS
I think this is a variant of Bug#26952 - "repeated buffer insertion
(e.g. yank-rectangle) consumes excessive memory (4GB+ for 90MB of
text)". I recommend upgrading to version 26.