[PATCH v2 1/1] memalign: Support scanning for aligned chunks.
DJ Delorie
dj@redhat.com
Tue Jul 19 17:32:21 GMT 2022
Florian Weimer <fweimer@redhat.com> writes:
> MAYBE_INIT_TCACHE does not seem necessary. If the tcache is empty,
> there's no need to initialize it and scane it.
> The tcache null check should be written as tcache != NULL.
Literal cut-n-paste from elsewhere in the code ;-)
> And why not scan the entire chain here?
Speed. The tcache list is not designed to be easy to access in the
middle. I know that's a weak excuse, but keeping everything going
through tcache_get() and tcache_put() both simplifies and robustifies
the code.
More information about the Libc-alpha
mailing list