unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Question about memory usage
@ 2018-04-02 11:57 Michał Kondraciuk
  2018-04-03  2:16 ` Óscar Fuentes
  2018-04-03  6:28 ` Eli Zaretskii
  0 siblings, 2 replies; 25+ messages in thread
From: Michał Kondraciuk @ 2018-04-02 11:57 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

Originally I wanted to report this to bug-gnu-emacs, but it's so basic 
that I thought I'd ask here instead.

Basically, when I run the sexp below in emacs -Q, Emacs keeps allocating 
a lot of memory. In 10 minutes, it goes from 18 MB to over 200 MB.

(while t
   (with-temp-buffer
     (setq buffer-undo-list nil)
     (insert "a")))


Calling garbage-collect afterwards or even inside the body of the loop 
doesn't help (except the loop obviously runs slower, so after 10 
minutes, Emacs uses ~100 MB of memory).
So I want to know if this behavior is expected for some reason? Does 
Emacs reuse this memory somehow (to make future allocations faster)? I 
tested on newest master and 25.3 and the behavior is the same.




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2018-04-07 18:39 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-02 11:57 Question about memory usage Michał Kondraciuk
2018-04-03  2:16 ` Óscar Fuentes
2018-04-03  6:28 ` Eli Zaretskii
2018-04-03 12:28   ` Stefan Monnier
2018-04-03 12:40     ` Eli Zaretskii
2018-04-03 12:51       ` Eli Zaretskii
2018-04-03 13:13       ` Stefan Monnier
2018-04-03 14:03         ` Eli Zaretskii
2018-04-03 14:27           ` Stefan Monnier
2018-04-03 15:16             ` Eli Zaretskii
2018-04-03 21:14               ` Stefan Monnier
2018-04-03 17:57   ` Michał Kondraciuk
2018-04-03 18:22     ` Eli Zaretskii
2018-04-03 19:16       ` Michał Kondraciuk
2018-04-04  6:55         ` Eli Zaretskii
2018-04-05 18:06           ` Michał Kondraciuk
2018-04-05 18:40             ` Eli Zaretskii
2018-04-05 18:54             ` Stefan Monnier
2018-04-07 13:15               ` Michał Kondraciuk
2018-04-07 13:26                 ` Eli Zaretskii
2018-04-07 15:22                   ` Stefan Monnier
2018-04-07 18:39                     ` Michał Kondraciuk
2018-04-03 21:18       ` Stefan Monnier
2018-04-04  6:08         ` Eli Zaretskii
2018-04-04 21:45           ` Stefan Monnier

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).