Hi Miroslav,

On Wed, Mar 22, 2023 at 01:11:53PM +0100, Miroslav Zagorac wrote:
> Hello all,
> 
> here is a patch that does not allow the use of malloc_trim() function if
> HAProxy is linked with the malloc library.  It was checked in some places in
> the source, but not everywhere.

Oh thanks for this, I remember noting it along a previous debugging
session related to the patterns, and I would have sworn it was done!

Interestingly we were speaking with William about this precise function
2 hours ago, saying that a more reliable long-term solution would be to
intercept it and replace it so that any possible calls made from child
libraries could be intercepted. This would then permit to get rid of
the library compatibility check in dl_open().

> Also, in that case, when calling 'haproxy -vv', it is no longer printed that
> malloc_trim is enabled.

I'm not sure what you mean here, because for me it's never printed that
malloc_trim() is enabled when building with jemalloc.

Thanks!
Willy

Reply via email to