Integrate auto tcache into TSD.

The embedded tcache is initialized upon tsd initialization.  The avail arrays
for the tbins will be allocated / deallocated accordingly during init / cleanup.

With this change, the pointer to the auto tcache will always be available, as
long as we have access to the TSD.  tcache_available() (called in tcache_get())
is provided to check if we should use tcache.
This commit is contained in:
Qi Wang 2017-03-27 21:50:38 -07:00 committed by Qi Wang
parent eeabdd2466
commit fde3e20cc0
16 changed files with 300 additions and 178 deletions

View file

@ -21,11 +21,6 @@ malloc_tsd_dalloc(void *wrapper) {
a0dalloc(wrapper);
}
void
malloc_tsd_no_cleanup(void *arg) {
not_reached();
}
#if defined(JEMALLOC_MALLOC_THREAD_CLEANUP) || defined(_WIN32)
#ifndef _WIN32
JEMALLOC_EXPORT