talloc vs malloc speed

Andrew Walker awalker at ixsystems.com
Fri Apr 14 19:49:24 UTC 2023

Oh forgot to mention: I don't recommend brute-forcing jemalloc like
that. It will potentially break applications using python modules that
use talloc. Threw it here for reference for some of the minor changes
I made (using calloc, some branch reduction, and removing memlimit
API). Can't recall off the top of my head what % benefit it was to
make those changes. malloc -> calloc benefit was primarily in cases
where I was artificially calling talloc_zero() with something rather
large (which is probably pretty obviously the case where it would
win). I poked around on it on a sick day IIRC and haven't been sick
since, hence no progress recently and a fuzzy memory of results. :)

More information about the samba-technical mailing list