[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33275: 27.0.50; Image cache pruning
From: |
Lars Ingebrigtsen |
Subject: |
bug#33275: 27.0.50; Image cache pruning |
Date: |
Mon, 05 Nov 2018 20:06:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> It would be reasonable if the code had asked for those images to be kept
>> in memory, but it hasn't. Emacs decides that on its own without saying
>> that it's doing that.
>
> You cannot assume anything about memory management while a Lisp
> program runs.
In general, if you don't have a reference to an object, you can be
pretty sure that Emacs is going to garbage-collect it. If you can't
assume that, then programming in Emacs Lisp becomes impossible.
Fortunately that's not the case, and programming in Emacs Lisp is nice
and easy.
>> It'd be similarly surprising if
>>
>> (dolist (file (directory-files "/directory/with/many/images" t "png$"))
>> (with-temp-buffer
>> (insert-file-contents-literally file)))
>>
>> were to lead to Emacs growing uncontrollably.
>
> That it doesn't is just sheer luck: the way we manage buffer memory is
> special. With any other Lisp object, it could well grow
> uncontrollably.
What other non-referenced Lisp object can realistically make Emacs grow
in this way?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#33275: 27.0.50; Image cache pruning, (continued)
- bug#33275: 27.0.50; Image cache pruning, Lars Ingebrigtsen, 2018/11/05
- bug#33275: 27.0.50; Image cache pruning, Eli Zaretskii, 2018/11/05
- bug#33275: 27.0.50; Image cache pruning, Eli Zaretskii, 2018/11/05
- bug#33275: 27.0.50; Image cache pruning, Lars Ingebrigtsen, 2018/11/05
- bug#33275: 27.0.50; Image cache pruning, Eli Zaretskii, 2018/11/05
- bug#33275: 27.0.50; Image cache pruning, Lars Ingebrigtsen, 2018/11/09
- bug#33275: 27.0.50; Image cache pruning, Eli Zaretskii, 2018/11/06
- bug#33275: 27.0.50; Image cache pruning, Lars Ingebrigtsen, 2018/11/09
- bug#33275: 27.0.50; Image cache pruning, Eli Zaretskii, 2018/11/10
- bug#33275: 27.0.50; Image cache pruning, Eli Zaretskii, 2018/11/05
- bug#33275: 27.0.50; Image cache pruning,
Lars Ingebrigtsen <=
- bug#33275: 27.0.50; Image cache pruning, Eli Zaretskii, 2018/11/05