bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: DJ Delorie
Subject: bug#45200: [PATCH] Force Glibc to free the memory freed
Date: Wed, 03 Feb 2021 23:02:05 -0500

Stefan Monnier <monnier@iro.umontreal.ca> writes:
> But wouldn't glibc release that memory even without calling
> `malloc_trim` simply because it's at the top and is larger than
> `M_TRIM_THRESHOLD`?

Probably, if you disabled fastbins.  Like I said earler, I think
fastbins bypasses the top-of-heap consolidation, so the chunks might be
free'd but in the fastbin cache.  malloc_trim() flushes the fastbin
cache.

There are other ways to flush the fastbins but they're harder to
programmatically invoke (i.e. "magic rules").






reply via email to

[Prev in Thread] Current Thread [Next in Thread]