[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38345: 27.0.50; Permanent increase in memory consumption after openi
From: |
Eli Zaretskii |
Subject: |
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs) |
Date: |
Tue, 26 Nov 2019 17:55:47 +0200 |
> From: Ihor Radchenko <yantar92@gmail.com>
> Cc: 38345@debbugs.gnu.org
> Date: Tue, 26 Nov 2019 23:21:11 +0800
>
> I did a small test by modifying my earlier lisp code to open and close
> the same image list sequentially:
>
> #+begin_src emacs-lisp
> (dolist (file (directory-files "~/Tosort/pictures&photos/" 'full ".*jpg"))
> (find-file file)
> (mapc #'kill-buffer (seq-filter (apply-partially #'string-match ".+.jpg$")
> (mapcar #'buffer-name (buffer-list)))))
> #+end_src
>
> The resulting memory usage graph is attached.
>
> What we can see is that the memory is indeed growing (as expected).
> Moreover, the memory consumption does not increase as much as if we open
> all the images together. However, the final heap size appears to be over
> 400Mb (from smaps), which is almost half of what was observed with all
> the images open at the same time.
Does it help to call garbage-collect after killing each buffer and
before visiting the next image file?
> P.S. Were there any attempts to implement garbage collection for emacs
> in C code?
I don't understand the question, sorry. GC in Emacs is implemented in
C, not in Lisp. If you mean to use a garbage-collecting memory
allocator, then we once had that only for buffer text, but nowadays
system malloc is good enough for that, so we no longer use it. Doing
that for "normal" C code is not easy because it generally requires
double indirection for accessing data through pointers.
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), (continued)
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/23
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/25
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/26
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Juri Linkov, 2019/11/27
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/27
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Lars Ingebrigtsen, 2019/11/28
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/28
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/28
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/28
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/28