server-skynet-source-3rd-je.../include/jemalloc
Jason Evans 8bb3198f72 Refactor/fix arenas manipulation.
Abstract arenas access to use arena_get() (or a0get() where appropriate)
rather than directly reading e.g. arenas[ind].  Prior to the addition of
the arenas.extend mallctl, the worst possible outcome of directly
accessing arenas was a stale read, but arenas.extend may allocate and
assign a new array to arenas.

Add a tsd-based arenas_cache, which amortizes arenas reads.  This
introduces some subtle bootstrapping issues, with tsd_boot() now being
split into tsd_boot[01]() to support tsd wrapper allocation
bootstrapping, as well as an arenas_cache_bypass tsd variable which
dynamically terminates allocation of arenas_cache itself.

Promote a0malloc(), a0calloc(), and a0free() to be generally useful for
internal allocation, and use them in several places (more may be
appropriate).

Abstract arena->nthreads management and fix a missing decrement during
thread destruction (recent tsd refactoring left arenas_cleanup()
unused).

Change arena_choose() to propagate OOM, and handle OOM in all callers.
This is important for providing consistent allocation behavior when the
MALLOCX_ARENA() flag is being used.  Prior to this fix, it was possible
for an OOM to result in allocation silently allocating from a different
arena than the one specified.
2014-10-07 23:14:57 -07:00
..
internal Refactor/fix arenas manipulation. 2014-10-07 23:14:57 -07:00
jemalloc_defs.h.in Remove the *allocm() API, which is superceded by the *allocx() API. 2014-04-14 22:32:31 -07:00
jemalloc_macros.h.in Add missing header includes in jemalloc/jemalloc.h . 2014-10-05 12:05:37 -07:00
jemalloc_mangle.sh Fix name mangling for stress tests. 2014-01-16 17:38:01 -08:00
jemalloc_protos.h.in Add support for sized deallocation. 2014-09-08 17:34:24 -07:00
jemalloc_rename.sh Fix name mangling for stress tests. 2014-01-16 17:38:01 -08:00
jemalloc_typedefs.h.in Attempt to expand huge allocations in-place. 2014-10-05 14:47:01 -07:00
jemalloc.sh Move typedefs from jemalloc_protos.h.in to jemalloc_typedefs.h.in. 2014-09-07 19:55:03 -07:00