Subject: Re: bug#45200: [PATCH] Force Glibc to free the memory freed

From: Eli Zaretskii <[email-masked]>
Date: Wed, 03 Feb 2021 16:44:17 +0200

> From: Konstantin Kharlamov <[email-masked]>
> Date: Wed, 03 Feb 2021 11:23:43 +0300
> Cc: [email-masked], [email-masked], [email-masked], [email-masked]
> 
> Second, most importantly, what `malloc_trim(0)` does is it restores the correct behavior. I mean, what's the point of ever freeing memory if it's not freed, right?

The purpose of freeing memory is to make it available for further
allocations by the program.  You seem to interpret "freeing memory" to
mean that memory should be returned to the OS, but that's not
necessarily true, and isn't required to allow the freeing program be
able to allocate more memory in the future.

> The problem we're dealing here with is an actual bug in glibc⁵. What this implies is that if the fix indeed hurts performance someplace, well, then it's that this place requires additional performance-related fixes. As opposed to just ignoring the bug because of performance got somewhere decreased. Things like, changing the slow algorithm, or modifying GC behavior for specific usecases…

The fact that the bug you reported didn't get any responses in  more
than a month, let alone wasn't fixed, could be a sign that not
everyone agrees this is a bug...