mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 08:33:38 +03:00
Refactor bootstrapping to delay tsd initialization.
Refactor bootstrapping to delay tsd initialization, primarily to support
integration with FreeBSD's libc.
Refactor a0*() for internal-only use, and add the
bootstrap_{malloc,calloc,free}() API for use by FreeBSD's libc. This
separation limits use of the a0*() functions to metadata allocation,
which doesn't require malloc/calloc/free API compatibility.
This resolves #170.
This commit is contained in:
parent
bc96876f99
commit
10aff3f3e1
6 changed files with 210 additions and 132 deletions
|
|
@ -15,14 +15,14 @@ void *
|
|||
malloc_tsd_malloc(size_t size)
|
||||
{
|
||||
|
||||
return (a0malloc(CACHELINE_CEILING(size)));
|
||||
return (a0malloc(CACHELINE_CEILING(size), false));
|
||||
}
|
||||
|
||||
void
|
||||
malloc_tsd_dalloc(void *wrapper)
|
||||
{
|
||||
|
||||
a0free(wrapper);
|
||||
a0dalloc(wrapper);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue