server-skynet-source-3rd-je.../include/jemalloc/internal
Dave Watson ed84764a2a Support static linking of jemalloc with glibc
glibc defines its malloc implementation with several weak and strong
symbols:

strong_alias (__libc_calloc, __calloc) weak_alias (__libc_calloc, calloc)
strong_alias (__libc_free, __cfree) weak_alias (__libc_free, cfree)
strong_alias (__libc_free, __free) strong_alias (__libc_free, free)
strong_alias (__libc_malloc, __malloc) strong_alias (__libc_malloc, malloc)

The issue is not with the weak symbols, but that other parts of glibc
depend on __libc_malloc explicitly.  Defining them in terms of jemalloc
API's allows the linker to drop glibc's malloc.o completely from the link,
and static linking no longer results in symbol collisions.

Another wrinkle: jemalloc during initialization calls sysconf to
get the number of CPU's.  GLIBC allocates for the first time before
setting up isspace (and other related) tables, which are used by
sysconf.  Instead, use the pthread API to get the number of
CPUs with GLIBC, which seems to work.

This resolves #442.
2016-10-28 15:10:19 -07:00
..
arena.h Fix and simplify decay-based purging. 2016-10-11 15:50:05 -07:00
assert.h Tweak code to allow compilation of concatenated src/*.c sources. 2015-11-12 11:06:41 -08:00
atomic.h Define 64-bits atomics unconditionally 2016-10-04 12:18:14 -07:00
base.h Resolve bootstrapping issues when embedded in FreeBSD libc. 2016-05-10 22:51:33 -07:00
bitmap.h Support --with-lg-page values larger than actual page size. 2016-04-11 02:35:00 -07:00
chunk_dss.h Make dss operations lockless. 2016-10-13 15:33:56 -07:00
chunk_mmap.h Attempt mmap-based in-place huge reallocation. 2016-02-24 17:23:18 -08:00
chunk.h Make dss operations lockless. 2016-10-13 15:33:56 -07:00
ckh.h Do not (recursively) allocate within tsd_fetch(). 2016-10-21 00:27:37 -07:00
ctl.h Resolve bootstrapping issues when embedded in FreeBSD libc. 2016-05-10 22:51:33 -07:00
extent.h Implement the arena.<i>.reset mallctl. 2016-04-22 15:20:06 -07:00
hash.h typecast address to pointer to byte to avoid unaligned memory access error 2016-03-10 22:49:05 -08:00
huge.h Make dss operations lockless. 2016-10-13 15:33:56 -07:00
jemalloc_internal_decls.h Support static linking of jemalloc with glibc 2016-10-28 15:10:19 -07:00
jemalloc_internal_defs.h.in Refine nstime_update(). 2016-10-10 11:40:46 -07:00
jemalloc_internal_macros.h Use KQU() rather than QU() where applicable. 2014-05-28 21:17:42 -07:00
jemalloc_internal.h.in Do not (recursively) allocate within tsd_fetch(). 2016-10-21 00:27:37 -07:00
mb.h Use TSDN_NULL rather than NULL as appropriate. 2016-10-04 15:56:56 -07:00
mutex.h Optimize witness fast path. 2016-05-11 15:38:06 -07:00
nstime.h Do not advance decay epoch when time goes backwards. 2016-10-10 22:31:37 -07:00
pages.h Modify pages_map() to support mapping uncommitted virtual memory. 2016-05-05 18:56:17 -07:00
ph.h Fix a style nit. 2016-04-12 23:18:25 -07:00
private_namespace.sh Refactor to support more varied testing. 2013-12-03 22:06:59 -08:00
private_symbols.txt Do not (recursively) allocate within tsd_fetch(). 2016-10-21 00:27:37 -07:00
private_unnamespace.sh Refactor to support more varied testing. 2013-12-03 22:06:59 -08:00
prng.h Refactor jemalloc_ffs*() into ffs_*(). 2016-02-24 13:03:48 -08:00
prof.h Do not (recursively) allocate within tsd_fetch(). 2016-10-21 00:27:37 -07:00
public_namespace.sh Fix name mangling for stress tests. 2014-01-16 17:38:01 -08:00
public_unnamespace.sh Fix name mangling for stress tests. 2014-01-16 17:38:01 -08:00
ql.h Style and spelling fixes. 2014-12-08 16:34:04 -08:00
qr.h Style and spelling fixes. 2014-12-08 16:34:04 -08:00
quarantine.h Make quarantine_init() static. 2014-11-07 14:50:38 -08:00
rb.h Remove rbt_nil 2016-02-23 18:09:25 -08:00
rtree.h Simplify RTREE_HEIGHT_MAX definition. 2016-04-11 02:35:00 -07:00
size_classes.sh Implement pz2ind(), pind2sz(), and psz2u(). 2016-10-04 16:29:19 -07:00
smoothstep.h Implement smoothstep table generation. 2016-02-19 20:56:15 -08:00
smoothstep.sh Implement smoothstep table generation. 2016-02-19 20:56:15 -08:00
spin.h Add/use adaptive spinning. 2016-10-13 14:58:38 -07:00
stats.h Add the stats.retained and stats.arenas.<i>.retained statistics. 2016-05-03 22:11:35 -07:00
tcache.h Do not (recursively) allocate within tsd_fetch(). 2016-10-21 00:27:37 -07:00
ticker.h Implement ticker. 2016-02-19 20:29:06 -08:00
tsd.h Do not (recursively) allocate within tsd_fetch(). 2016-10-21 00:27:37 -07:00
util.h Check for __builtin_unreachable at configure time 2016-09-26 10:44:37 -07:00
valgrind.h Resolve bootstrapping issues when embedded in FreeBSD libc. 2016-05-10 22:51:33 -07:00
witness.h Optimize witness fast path. 2016-05-11 15:38:06 -07:00