mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-04 09:30:00 +03:00
Implement tsd.
Implement tsd, which is a TLS/TSD abstraction that uses one or both internally. Modify bootstrapping such that no tsd's are utilized until allocation is safe. Remove malloc_[v]tprintf(), and use malloc_snprintf() instead. Fix %p argument size handling in malloc_vsnprintf(). Fix a long-standing statistics-related bug in the "thread.arena" mallctl that could cause crashes due to linked list corruption.
This commit is contained in:
parent
154829d256
commit
cd9a1346e9
19 changed files with 705 additions and 363 deletions
14
src/chunk.c
14
src/chunk.c
|
|
@ -100,7 +100,7 @@ chunk_dealloc(void *chunk, size_t size, bool unmap)
|
|||
}
|
||||
|
||||
bool
|
||||
chunk_boot(void)
|
||||
chunk_boot0(void)
|
||||
{
|
||||
|
||||
/* Set variables according to the value of opt_lg_chunk. */
|
||||
|
|
@ -114,8 +114,6 @@ chunk_boot(void)
|
|||
return (true);
|
||||
memset(&stats_chunks, 0, sizeof(chunk_stats_t));
|
||||
}
|
||||
if (chunk_mmap_boot())
|
||||
return (true);
|
||||
if (config_dss && chunk_dss_boot())
|
||||
return (true);
|
||||
if (config_ivsalloc) {
|
||||
|
|
@ -127,3 +125,13 @@ chunk_boot(void)
|
|||
|
||||
return (false);
|
||||
}
|
||||
|
||||
bool
|
||||
chunk_boot1(void)
|
||||
{
|
||||
|
||||
if (chunk_mmap_boot())
|
||||
return (true);
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue