95 lines
3.2 KiB
C
95 lines
3.2 KiB
C
|
/*-
|
||
|
* Copyright (C) 2009 Facebook, Inc.
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
* Redistribution and use in source and binary forms, with or without
|
||
|
* modification, are permitted provided that the following conditions are met:
|
||
|
* * Redistributions of source code must retain the above copyright notice,
|
||
|
* this list of conditions and the following disclaimer.
|
||
|
* * Redistributions in binary form must reproduce the above copyright notice,
|
||
|
* this list of conditions and the following disclaimer in the documentation
|
||
|
* and/or other materials provided with the distribution.
|
||
|
* * Neither the name of Facebook, Inc. nor the names of its contributors may
|
||
|
* be used to endorse or promote products derived from this software without
|
||
|
* specific prior written permission.
|
||
|
*
|
||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||
|
*
|
||
|
*******************************************************************************
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
* Hyper-threaded CPUs may need a special instruction inside spin loops in
|
||
|
* order to yield to another virtual CPU.
|
||
|
*/
|
||
|
#undef CPU_SPINWAIT
|
||
|
|
||
|
/*
|
||
|
* JEMALLOC_DEBUG enables assertions and other sanity checks, and disables
|
||
|
* inline functions.
|
||
|
*/
|
||
|
#undef JEMALLOC_DEBUG
|
||
|
|
||
|
/* JEMALLOC_STATS enables statistics calculation. */
|
||
|
#undef JEMALLOC_STATS
|
||
|
|
||
|
/*
|
||
|
* JEMALLOC_TINY enables support for tiny objects, which are smaller than one
|
||
|
* quantum.
|
||
|
*/
|
||
|
#undef JEMALLOC_TINY
|
||
|
|
||
|
/*
|
||
|
* JEMALLOC_MAG enables a magazine-based thread-specific caching layer for small
|
||
|
* objects. This makes it possible to allocate/deallocate objects without any
|
||
|
* locking when the cache is in the steady state.
|
||
|
*/
|
||
|
#undef JEMALLOC_MAG
|
||
|
|
||
|
/*
|
||
|
* JEMALLOC_BALANCE enables monitoring of arena lock contention and dynamically
|
||
|
* re-balances arena load if exponentially averaged contention exceeds a
|
||
|
* certain threshold.
|
||
|
*/
|
||
|
#undef JEMALLOC_BALANCE
|
||
|
|
||
|
/*
|
||
|
* JEMALLOC_DSS enables use of sbrk(2) to allocate chunks from the data storage
|
||
|
* segment (DSS).
|
||
|
*/
|
||
|
#undef JEMALLOC_DSS
|
||
|
|
||
|
/* Support memory filling (junk/zero). */
|
||
|
#undef JEMALLOC_FILL
|
||
|
|
||
|
/* Support optional abort() on OOM. */
|
||
|
#undef JEMALLOC_XMALLOC
|
||
|
|
||
|
/* Support SYSV semantics. */
|
||
|
#undef JEMALLOC_SYSV
|
||
|
|
||
|
/* Support lazy locking (avoid locking unless a second thread is launched). */
|
||
|
#undef JEMALLOC_LAZY_LOCK
|
||
|
|
||
|
/* Determine page size at run time if defined. */
|
||
|
#undef DYNAMIC_PAGE_SHIFT
|
||
|
|
||
|
/* One page is 2^STATIC_PAGE_SHIFT bytes. */
|
||
|
#undef STATIC_PAGE_SHIFT
|
||
|
|
||
|
/* TLS is used to map arenas and magazine caches to threads. */
|
||
|
#undef NO_TLS
|
||
|
|
||
|
/* sizeof(void *) == 2^SIZEOF_PTR_2POW. */
|
||
|
#undef SIZEOF_PTR_2POW
|