freebsd-dev/lib/libthr/thread
Jason Evans d6742bfbd3 Add thread-specific caching for small size classes, based on magazines.
This caching allows for completely lock-free allocation/deallocation in the
steady state, at the expense of likely increased memory use and
fragmentation.

Reduce the default number of arenas to 2*ncpus, since thread-specific
caching typically reduces arena contention.

Modify size class spacing to include ranges of 2^n-spaced, quantum-spaced,
cacheline-spaced, and subpage-spaced size classes.  The advantages are:
fewer size classes, reduced false cacheline sharing, and reduced internal
fragmentation for allocations that are slightly over 512, 1024, etc.

Increase RUN_MAX_SMALL, in order to limit fragmentation for the
subpage-spaced size classes.

Add a size-->bin lookup table for small sizes to simplify translating sizes
to size classes.  Include a hard-coded constant table that is used unless
custom size class spacing is specified at run time.

Add the ability to disable tiny size classes at compile time via
MALLOC_TINY.
2008-08-27 02:00:53 +00:00
..
Makefile.inc Add POSIX pthread API pthread_getcpuclockid() to get a thread's cpu 2008-03-22 09:59:20 +00:00
thr_affinity.c Avoid various shadowed variables. libthr is now almost WARNS=4 clean except 2008-04-23 21:06:51 +00:00
thr_atfork.c Replace internal usage of struct umtx with umutex which can supports 2006-09-06 04:04:10 +00:00
thr_attr.c Avoid various shadowed variables. libthr is now almost WARNS=4 clean except 2008-04-23 21:06:51 +00:00
thr_autoinit.c
thr_barrier.c _thr_ucond_wait drops lock, we should pick it up again. 2006-12-05 23:46:11 +00:00
thr_barrierattr.c WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
thr_cancel.c Tweak _thr_cancel_leave_defer a bit to fix a possible race. 2006-12-05 05:01:57 +00:00
thr_clean.c Make pthread_cleanup_push() and pthread_cleanup_pop() as a pair of macros, 2008-06-09 01:14:10 +00:00
thr_concurrency.c WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
thr_cond.c Remove unused functions. 2008-04-02 08:33:42 +00:00
thr_condattr.c In function pthread_condattr_getpshared, store result correctly. 2008-08-01 01:21:49 +00:00
thr_create.c Use UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE to save 2008-04-29 03:58:18 +00:00
thr_detach.c WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
thr_equal.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_event.c Replace internal usage of struct umtx with umutex which can supports 2006-09-06 04:04:10 +00:00
thr_exit.c Add thread-specific caching for small size classes, based on magazines. 2008-08-27 02:00:53 +00:00
thr_fork.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_getcpuclockid.c Add POSIX pthread API pthread_getcpuclockid() to get a thread's cpu 2008-03-22 09:59:20 +00:00
thr_getprio.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_getschedparam.c use rtprio_thread system call to get or set thread priority. 2006-09-21 04:21:30 +00:00
thr_info.c If a thread who's name is being set is not the current thread, use macros 2007-04-05 07:20:31 +00:00
thr_init.c - Reduce function call overhead for uncontended case. 2008-05-29 07:57:33 +00:00
thr_join.c If a thread was detached, return EINVAL instead, the error code 2006-11-28 11:05:31 +00:00
thr_kern.c use rtprio_thread system call to get or set thread priority. 2006-09-21 04:21:30 +00:00
thr_kill.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_list.c Eliminate atomic operations in thread cancellation functions, it should 2006-11-24 09:57:38 +00:00
thr_main_np.c WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
thr_multi_np.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_mutex.c Add two commands to _umtx_op system call to allow a simple mutex to be 2008-06-24 07:32:12 +00:00
thr_mutexattr.c pthread_mutexattr_destroy() was accidentally broken in last revision, 2008-03-20 11:47:08 +00:00
thr_once.c Eliminate global mutex by using pthread_once's state field as 2008-05-30 00:02:59 +00:00
thr_printf.c Import my recent 1:1 threading working. some features improved includes: 2005-04-02 01:20:00 +00:00
thr_private.h Make pthread_cleanup_push() and pthread_cleanup_pop() as a pair of macros, 2008-06-09 01:14:10 +00:00
thr_pspinlock.c Reverse the logic of UP and SMP. 2007-10-16 07:36:02 +00:00
thr_resume_np.c Use UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE to save 2008-04-29 03:58:18 +00:00
thr_rtld.c Use native rwlock. 2008-04-22 06:44:11 +00:00
thr_rwlock.c don't include pthread_np.h, it is not used. 2008-04-14 08:08:40 +00:00
thr_rwlockattr.c WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
thr_self.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_sem.c Use UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE to save 2008-04-29 03:58:18 +00:00
thr_setprio.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_setschedparam.c use rtprio_thread system call to get or set thread priority. 2006-09-21 04:21:30 +00:00
thr_sig.c Use UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE to save 2008-04-29 03:58:18 +00:00
thr_single_np.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_spec.c In _pthread_key_create() ensure that libthr is initialized. This 2007-11-06 21:50:43 +00:00
thr_spinlock.c Avoid various shadowed variables. libthr is now almost WARNS=4 clean except 2008-04-23 21:06:51 +00:00
thr_stack.c WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
thr_suspend_np.c Use UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE to save 2008-04-29 03:58:18 +00:00
thr_switch_np.c WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
thr_symbols.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_syscalls.c Call the fcntl compatiblity wrapper from the thread library fcntl wrappers 2008-05-30 14:47:42 +00:00
thr_umtx.c Add two commands to _umtx_op system call to allow a simple mutex to be 2008-06-24 07:32:12 +00:00
thr_umtx.h Add two commands to _umtx_op system call to allow a simple mutex to be 2008-06-24 07:32:12 +00:00
thr_yield.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00