Subject: Re: bug#33275: 27.0.50; Image cache pruning

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 09 Nov 2018 13:22:08 +0100

(Sorry for the late response; things got in the way as usual...)

Eli Zaretskii <[email-masked]> writes:

>> `image-size' didn't use to cache images, but was introduced as an
>> optimisation.
>
> And that optimization had a reason, right?

Yeah, the normal use case when you're doing images is that you're going
to end up displaying it.  And `image-size' has to render the image to
see how big it is, so during normal usage, having `image-size' cache the
image is a big win.

Hm...  Perhaps `image-size' should just have a DONT-CACHE optional
parameter?

> Btw, why doesn't xmalloc return NULL in your case before invoking the
> OOM killer?  Is that expected behavior on GNU/Linux systems?

No, you've got overcommit on Linux, so you often don't get a NULL when
you need it...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no