cvs commit: src/lib/libc/stdlib malloc.c

2008-09-10 Thread Jason Evans
jasone 2008-09-10 14:27:34 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: SVN rev 182906 on 2008-09-10 14:27:34Z by jasone Use PAGE_{SIZE,MASK,SHIFT} from machine/param.h rather than hard-coding page size and using sysconf(3).

cvs commit: src/lib/libc/stdlib malloc.c

2008-09-05 Thread Marcel Moolenaar
marcel 2008-09-06 05:26:31 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: SVN rev 182809 on 2008-09-06 05:26:31Z by marcel Unbreak ia64: pges are 8KB. Revision ChangesPath 1.178 +1 -1 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2008-08-16 Thread Jason Evans
jasone 2008-08-16 20:14:21 UTC FreeBSD src repository Modified files:(Branch: RELENG_7) lib/libc/stdlib malloc.c Log: SVN rev 181788 on 2008-08-16 20:14:21Z by jasone MFC allocator improvements and fixes: * Enhance the chunk map to support run coalescing,

cvs commit: src/lib/libc/stdlib malloc.c

2008-08-14 Thread Jason Evans
jasone 2008-08-14 17:03:29 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: SVN rev 181732 on 2008-08-14 17:03:29Z by jasone Re-order the terms of an expression in arena_run_reg_dalloc() to correctly detect whether the integer division table

cvs commit: src/lib/libc/stdlib malloc.c

2008-08-14 Thread Jason Evans
jasone 2008-08-14 17:31:42 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: SVN rev 181733 on 2008-08-14 17:31:42Z by jasone Move CPU_SPINWAIT into the innermost spin loop, in order to allow faster preemption while busy-waiting.

cvs commit: src/lib/libc/stdlib malloc.c

2008-08-08 Thread Colin Percival
cperciva2008-08-08 20:42:42 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: SVN rev 181438 on 2008-08-08 20:42:42Z by cperciva Remove variables which are assigned values and never used thereafter. Found by: LLVM/Clang Static Checker

cvs commit: src/lib/libc/stdlib malloc.c

2008-07-18 Thread Jason Evans
jasone 2008-07-18 19:35:44 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: SVN rev 180599 on 2008-07-18 19:35:44Z by jasone Enhance arena_chunk_map_t to directly support run coalescing, and use the chunk map instead of red-black trees where

cvs commit: src/lib/libc/stdlib malloc.c rb.h

2008-06-16 Thread Jason Evans
jasone 2008-06-16 23:42:05 UTC FreeBSD src repository Modified files:(Branch: RELENG_7) lib/libc/stdlib malloc.c Added files: (Branch: RELENG_7) lib/libc/stdlib rb.h Log: SVN rev 179836 on 2008-06-16 23:42:05Z by jasone MFC allocator

cvs commit: src/lib/libc/stdlib malloc.c

2008-06-10 Thread Jason Evans
jasone 2008-06-10 15:46:18 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: SVN rev 179704 on 2008-06-10 15:46:18Z by jasone In the error path through base_alloc(), release base_mtx [1]. Fix bit vector initialization for run headers.

cvs commit: src/lib/libc/stdlib malloc.c

2008-05-01 Thread Jason Evans
jasone 2008-05-01 17:25:55 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add a separate tree to track arena chunks that contain dirty pages. This substantially improves worst case allocation performance, since O(lg n) tree search can be used

cvs commit: src/lib/libc/stdlib malloc.c

2008-04-29 Thread Oleksandr Tymoshenko
gonzo 2008-04-29 22:56:06 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Set QUANTUM_2POW_MIN and SIZEOF_PTR_2POW parameters for MIPS Approved by: imp Revision ChangesPath 1.170 +5 -0 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2008-04-28 Thread Jason Evans
jasone 2008-04-29 01:32:42 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Check for integer overflow before calling sbrk(2), since it uses a signed increment argument, but the size is an unsigned integer. Revision ChangesPath 1.169

cvs commit: src/lib/libc/stdlib malloc.c rb.h

2008-04-23 Thread Jason Evans
jasone 2008-04-23 16:09:18 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Added files: lib/libc/stdlib rb.h Log: Implement red-black trees without using parent pointers, and store the color bit in the least significant bit of the right

Re: cvs commit: src/lib/libc/stdlib malloc.c rb.h

2008-04-23 Thread Bruce M. Simpson
Jason Evans wrote: Log: Implement red-black trees without using parent pointers, and store the color bit in the least significant bit of the right child pointer, in order to reduce red-black tree linkage overhead by ~2X as compared to sys/tree.h. Interesting. Will this work in the

Re: cvs commit: src/lib/libc/stdlib malloc.c rb.h

2008-04-23 Thread Jason Evans
Bruce M. Simpson wrote: Jason Evans wrote: Log: Implement red-black trees without using parent pointers, and store the color bit in the least significant bit of the right child pointer, in order to reduce red-black tree linkage overhead by ~2X as compared to sys/tree.h. Interesting.

cvs commit: src/lib/libc/stdlib malloc.c

2008-03-07 Thread Jason Evans
jasone 2008-03-07 16:54:04 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Remove stale #include machine/atomic.h, which as needed by lazy deallocation. Revision ChangesPath 1.167 +4 -4 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2008-02-17 Thread Jason Evans
jasone 2008-02-17 18:34:17 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix a race condition in arena_ralloc() for shrinking in-place large reallocation, when junk filling is enabled. Junk filling must occur prior to shrinking, since any

cvs commit: src/lib/libc/stdlib malloc.c

2008-02-08 Thread Jason Evans
jasone 2008-02-08 08:02:34 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix a bug in lazy deallocation that was introduced when arena_dalloc_lazy_hard() was split out of arena_dalloc_lazy() in revision 1.162. Reduce thundering herd

cvs commit: src/lib/libc/stdlib malloc.c

2008-02-07 Thread Jason Evans
jasone 2008-02-08 00:35:57 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Clean up manipulation of chunk page map elements to remove some tenuous assumptions about whether bits are set at various times. This makes adding other flags safe.

cvs commit: src/lib/libc/stdlib malloc.c

2007-12-30 Thread Jason Evans
jasone 2007-12-31 00:59:16 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix a bug related to sbrk() calls that could cause address space leaks. This is a long-standing bug, but until recent changes it was difficult to trigger, and even then

cvs commit: src/lib/libc/stdlib malloc.c

2007-12-30 Thread Jason Evans
jasone 2007-12-31 06:19:48 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix a major chunk-related memory leak in chunk_dealloc_dss_record(). [1] Clean up DSS-related locking and protect all pertinent variables with dss_mtx (remove

cvs commit: src/lib/libc/stdlib malloc.c

2007-12-28 Thread Jason Evans
jasone 2007-12-28 09:21:12 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Back out premature commit of previous version. Revision ChangesPath 1.158 +113 -183 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2007-12-27 Thread Jason Evans
jasone 2007-12-28 02:15:09 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Release chunks_mtx for all paths through chunk_dealloc(). Reported by:kris Revision ChangesPath 1.156 +4 -1 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2007-12-27 Thread Jason Evans
jasone 2007-12-28 07:24:20 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Maintain two trees instead of one (old_chunks -- old_chunks_{ad,szad}) in order to support re-use of multi-chunk unused regions within the DSS for huge allocations.

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-12-27 Thread Jason Evans
Jason Evans wrote: jasone 2007-12-28 07:24:20 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Maintain two trees instead of one (old_chunks -- old_chunks_{ad,szad}) in order to support re-use of multi-chunk unused regions within the DSS for

cvs commit: src/lib/libc/stdlib malloc.c

2007-12-17 Thread Jason Evans
jasone 2007-12-18 05:27:58 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Use fixed point integer math instead of floating point math when calculating run sizes. Use of the floating point unit was a potential pessimization to context

cvs commit: src/lib/libc/stdlib malloc.c

2007-12-16 Thread Jason Evans
jasone 2007-12-17 01:20:04 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Refactor features a bit in order to make it possible to disable lazy deallocation and dynamic load balancing via the MALLOC_LAZY_FREE and MALLOC_BALANCE knobs. This is

cvs commit: src/lib/libc/stdlib malloc.c

2007-11-27 Thread Jason Evans
jasone 2007-11-28 00:17:34 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Only zero large allocations when necessary (for calloc()). Revision ChangesPath 1.152 +1 -1 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2007-11-26 Thread Jason Evans
jasone 2007-11-27 03:09:24 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix stats printing of the amount of memory currently consumed by huge allocations. [1] Fix calculation of the number of arenas when 'n' is specified via

cvs commit: src/lib/libc/stdlib malloc.c

2007-11-26 Thread Jason Evans
jasone 2007-11-27 03:12:16 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Avoid re-zeroing memory in calloc() when possible. Revision ChangesPath 1.149 +218 -143 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2007-11-26 Thread Jason Evans
jasone 2007-11-27 03:13:15 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Implement lazy deallocation of small objects. For each arena, maintain a vector of slots for lazily freed objects. For each deallocation, before doing the hard work of

cvs commit: src/lib/libc/stdlib malloc.c

2007-11-26 Thread Jason Evans
jasone 2007-11-27 03:17:30 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Implement dynamic load balancing of thread--arena mapping, based on lock contention. The intent is to dynamically adjust to load imbalances, which can cause severe

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-11-26 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Proper tuning parameter configuration for this change is a finicky business, and it is very much machine-dependent. One seemingly promising solution would be to run a tuning program during operating system installation that computes

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-11-26 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason Evans wrote: jasone 2007-11-27 03:17:30 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Implement dynamic load balancing of thread--arena mapping, based on lock contention. The intent

cvs commit: src/lib/libc/stdlib malloc.c

2007-10-11 Thread Ken Smith
kensmith2007-10-11 06:35:47 UTC FreeBSD src repository Modified files:(Branch: RELENG_7) lib/libc/stdlib malloc.c Log: Turn on MALLOC_PRODUCTION which turns off some stuff used for debugging support. Reminded by:kris Approved by:re (implicit)

cvs commit: src/lib/libc/stdlib malloc.c

2007-06-15 Thread Jason Evans
jasone 2007-06-15 22:00:16 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix junk/zero filling for realloc(). Junk filling was missing in one case, and zero filling was broken in a way that could cause memory corruption. Update comments.

cvs commit: src/lib/libc/stdlib malloc.c

2007-03-29 Thread Jason Evans
jasone 2007-03-29 21:07:17 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Use size_t instead of unsigned for pagesize-related values, in order to avoid downcasting issues. In particular, this change fixes posix_memalign(3) for alignments

cvs commit: src/lib/libc/stdlib malloc.c

2007-03-28 Thread Jason Evans
jasone 2007-03-28 19:55:07 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Remove the run promotion/demotion machinery. Replace it with red-black trees that track all non-full runs for each bin. Use the red-black trees to be able to guarantee

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-03-25 Thread Andrew Pantyukhin
On 3/23/07, Jason Evans [EMAIL PROTECTED] wrote: Matteo Riondato wrote: On Fri, Mar 23, 2007 at 05:05:48AM +, Jason Evans wrote: jasone 2007-03-23 05:05:48 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Revision ChangesPath 1.142

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-03-25 Thread Matteo Riondato
On Sun, Mar 25, 2007 at 06:08:37PM +0300, Andrew Pantyukhin wrote: On 3/23/07, Jason Evans [EMAIL PROTECTED] wrote: Matteo Riondato wrote: On Fri, Mar 23, 2007 at 05:05:48AM +, Jason Evans wrote: jasone 2007-03-23 05:05:48 UTC FreeBSD src repository Modified files:

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-03-24 Thread Matteo Riondato
On Fri, Mar 23, 2007 at 10:58:15PM +, Jason Evans wrote: jasone 2007-03-23 22:58:15 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Revision ChangesPath 1.143 +297 -151 src/lib/libc/stdlib/malloc.c I can confirm this commit fixed

cvs commit: src/lib/libc/stdlib malloc.c

2007-03-24 Thread Jason Evans
jasone 2007-03-24 20:44:07 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix some subtle bugs for posix_memalign() having to do with integer rounding and overflow. Carefully document what the various overflow tests actually detect. The

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-03-23 Thread Matteo Riondato
On Fri, Mar 23, 2007 at 05:05:48AM +, Jason Evans wrote: jasone 2007-03-23 05:05:48 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Revision ChangesPath 1.142 +337 -328 src/lib/libc/stdlib/malloc.c Can this commit be the cause of

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-03-23 Thread Jason Evans
Matteo Riondato wrote: On Fri, Mar 23, 2007 at 05:05:48AM +, Jason Evans wrote: jasone 2007-03-23 05:05:48 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Revision ChangesPath 1.142 +337 -328 src/lib/libc/stdlib/malloc.c Can this

cvs commit: src/lib/libc/stdlib malloc.c

2007-03-23 Thread Jason Evans
jasone 2007-03-23 22:58:15 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix posix_memalign() for large objects. Now that runs are extents rather than binary buddies, the alignment guarantees are weaker, which requires a more complex aligned

cvs commit: src/lib/libc/stdlib malloc.c

2007-03-22 Thread Jason Evans
jasone 2007-03-23 05:05:48 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Use extents rather than binary buddies to track free pages within chunks. This allows runs to be any multiple of the page size. The primary advantage is that large

cvs commit: src/lib/libc/stdlib malloc.c

2007-03-19 Thread Jason Evans
jasone 2007-03-20 03:44:10 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Avoid using vsnprintf(3) unless MALLOC_STATS is defined, in order to avoid substantial potential bloat for static binaries that do not otherwise use any printf(3)-family

cvs commit: src/lib/libc/stdlib malloc.c

2007-02-22 Thread Jason Evans
jasone 2007-02-22 19:10:30 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Modify chunk_alloc() to prefer mmap()ed memory over sbrk()ed memory. This has no impact unless USE_BRK is defined (32-bit platforms), in which case user allocations are

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-02-01 Thread John Baldwin
On Wednesday 31 January 2007 19:16, Jason Evans wrote: Coleman Kane wrote: Modified files: lib/libc/stdlib malloc.c Log: Fix a utrace(2)-related bug in calloc(3). Integrate various pedantic cleanups. Submitted by: Andrew Doran [EMAIL

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-02-01 Thread Coleman Kane
On 2/1/07, John Baldwin [EMAIL PROTECTED] wrote: On Wednesday 31 January 2007 19:16, Jason Evans wrote: Coleman Kane wrote: Modified files: lib/libc/stdlib malloc.c Log: Fix a utrace(2)-related bug in calloc(3). Integrate various pedantic

cvs commit: src/lib/libc/stdlib malloc.c

2007-01-31 Thread Jason Evans
jasone 2007-01-31 22:54:19 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix a utrace(2)-related bug in calloc(3). Integrate various pedantic cleanups. Submitted by: Andrew Doran [EMAIL PROTECTED] Revision ChangesPath

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-01-31 Thread Coleman Kane
On 1/31/07, Jason Evans [EMAIL PROTECTED] wrote: jasone 2007-01-31 22:54:19 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix a utrace(2)-related bug in calloc(3). Integrate various pedantic cleanups. Submitted by: Andrew Doran [EMAIL

Re: cvs commit: src/lib/libc/stdlib malloc.c

2007-01-31 Thread Jason Evans
Coleman Kane wrote: Modified files: lib/libc/stdlib malloc.c Log: Fix a utrace(2)-related bug in calloc(3). Integrate various pedantic cleanups. Submitted by: Andrew Doran [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Revision ChangesPath

cvs commit: src/lib/libc/stdlib malloc.c

2006-12-22 Thread Jason Evans
jasone 2006-12-23 00:18:51 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Implement chunk allocation/deallocation hysteresis by caching one spare chunk per arena, rather than immediately deallocating all unused chunks. This fixes a potential

cvs commit: src/lib/libc/stdlib malloc.c

2006-09-08 Thread Jason Evans
jasone 2006-09-08 17:52:15 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Change the way base allocation is done for internal malloc data structures, in order to avoid the possibility of attempted recursive lock acquisition for chunks_mtx.

cvs commit: src/lib/libc/stdlib malloc.c

2006-09-01 Thread Marcel Moolenaar
marcel 2006-09-01 06:18:44 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Enable TLS on ia64. Revision ChangesPath 1.135 +0 -1 src/lib/libc/stdlib/malloc.c ___ cvs-all@freebsd.org

cvs commit: src/lib/libc/stdlib malloc.c

2006-09-01 Thread Marcel Moolenaar
marcel 2006-09-01 19:14:14 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Enable TLS on PowerPC. Revision ChangesPath 1.136 +0 -1 src/lib/libc/stdlib/malloc.c ___ cvs-all@freebsd.org

cvs commit: src/lib/libc/stdlib malloc.c

2006-08-09 Thread Marcel Moolenaar
marcel 2006-08-09 19:01:27 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Define NO_TLS on PowerPC. See also: PR ia64/91846 Revision ChangesPath 1.133 +1 -0 src/lib/libc/stdlib/malloc.c

cvs commit: src/lib/libc/stdlib malloc.c

2006-07-27 Thread Olivier Houchard
cognet 2006-07-27 14:36:28 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Use 4 as QUANTUM_2POW_MIN on arm as it is on any other architecture, to avoid triggering an assertion later. Revision ChangesPath 1.131 +1 -1

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-07-27 Thread John-Mark Gurney
Olivier Houchard wrote this message on Thu, Jul 27, 2006 at 14:36 +: cognet 2006-07-27 14:36:28 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Use 4 as QUANTUM_2POW_MIN on arm as it is on any other architecture, to avoid

cvs commit: src/lib/libc/stdlib malloc.c

2006-07-27 Thread Jason Evans
jasone 2006-07-27 19:09:32 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Conditionally expand the size_invs lookup table in arena_run_reg_dalloc() so that architectures with a quantum of 8 (rather than 16) work. Restore arm's quantum to 8.

cvs commit: src/lib/libc/stdlib malloc.c

2006-07-26 Thread Jason Evans
jasone 2006-07-27 04:00:13 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix cpp logic in arena_malloc() to adjust size when assertions are enabled, even if stats gathering is disabled. [1] Remove 'size' parameter from several functions

cvs commit: src/lib/libc/stdlib malloc.c

2006-07-01 Thread Jason Evans
jasone 2006-07-01 16:51:11 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Use some math tricks in arena_run_reg_dalloc() to avoid actual division, as well as avoiding a switch statement. This change has no significant impact to performance

cvs commit: src/lib/libc/stdlib malloc.c

2006-06-30 Thread Jason Evans
jasone 2006-06-30 20:54:15 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Make the behavior of malloc(0) standards-compliant by getting rid of nil, and instead creating a small allocation for each malloc(0) call. The optional SysV

cvs commit: src/lib/libc/stdlib malloc.c

2006-06-20 Thread Jason Evans
jasone 2006-06-20 20:38:25 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add a missing case for the switch statement in arena_run_reg_dalloc(). [1] Fix a leak in chunk_dealloc(). [2] Reported by:[1] [EMAIL PROTECTED],

cvs commit: src/lib/libc/stdlib malloc.c

2006-05-09 Thread Jason Evans
jasone 2006-05-10 00:07:45 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Increase the minimum chunk size by a power of two (32kB -- 64kB, assuming 4kB pages), in order to avoid dangerous rounding error when calculating fullness limits during

cvs commit: src/lib/libc/stdlib malloc.c

2006-04-05 Thread Jason Evans
jasone 2006-04-05 18:46:24 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add an unreachable return statement, in order to avoid a compiler warning for non-standard optimization levels. Reported by:Michael Zach [EMAIL PROTECTED]

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-04-05 Thread Peter Jeremy
On Wed, 2006-Apr-05 18:46:24 +, Jason Evans wrote: jasone 2006-04-05 18:46:24 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add an unreachable return statement, in order to avoid a compiler warning for non-standard optimization levels.

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-04-05 Thread Jason Evans
Peter Jeremy wrote: On Wed, 2006-Apr-05 18:46:24 +, Jason Evans wrote: jasone 2006-04-05 18:46:24 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add an unreachable return statement, in order to avoid a compiler warning for non-standard optimization

cvs commit: src/lib/libc/stdlib malloc.c

2006-04-04 Thread Jason Evans
jasone 2006-04-04 19:46:28 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add init_lock, and use it to protect against allocator initialization races. This isn't currently necessary for libpthread or libthr, but without it external threads

cvs commit: src/lib/libc/stdlib malloc.c

2006-04-04 Thread Jason Evans
jasone 2006-04-05 04:15:12 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Only initialize the first per-chunk page map element for free runs. This makes run split/coalesce operations of complexity lg(n) rather than n. Revision Changes

cvs commit: src/lib/libc/stdlib malloc.c

2006-04-03 Thread Jason Evans
jasone 2006-04-04 03:51:47 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Refactor per-run bitmap manipulation functions so that bitmap offsets only have to be calculated once per allocator operation. Make nil const. Update various

cvs commit: src/lib/libc/stdlib malloc.c

2006-03-30 Thread Jason Evans
jasone 2006-03-30 20:25:52 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Optimize runtime performance, primary using the following techniques: * Avoid choosing an arena until it's certain that an arena is needed for allocation.

cvs commit: src/lib/libc/stdlib malloc.c

2006-03-26 Thread Jason Evans
jasone 2006-03-26 23:37:25 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add comments and reformat/rearrange code. There are no significant functional changes in this commit. Revision ChangesPath 1.117 +224 -208

cvs commit: src/lib/libc/stdlib malloc.c

2006-03-26 Thread Jason Evans
jasone 2006-03-26 23:41:35 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Allow the 'n' option to decrease the number of arenas below the default, to as little as one arena. Also, limit the number of arenas to avoid a potential invariant

cvs commit: src/lib/libc/stdlib malloc.c

2006-03-24 Thread Jason Evans
jasone 2006-03-24 22:13:49 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Convert TINY_MIN_2POW from a cpp macro to tiny_min_2pow (a variable), and determine its value at run time according to other relevant values. This avoids the creation

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-03-24 Thread Jason Evans
Jason Evans wrote: jasone 2006-03-24 22:13:49 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Convert TINY_MIN_2POW from a cpp macro to tiny_min_2pow (a variable), and determine its value at run time according to other relevant values. This

cvs commit: src/lib/libc/stdlib malloc.c

2006-03-23 Thread Jason Evans
jasone 2006-03-24 00:28:08 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add USE_BRK-specific code in malloc_init_hard() to allow the first internally used chunk to start at the beginning of the heap, rather than at a chunk-aligned address.

cvs commit: src/lib/libc/stdlib malloc.c

2006-03-19 Thread Jason Evans
jasone 2006-03-19 18:28:07 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Optimize realloc() to reallocate in place if the old and new sizes are close enough to each other that reallocation would allocate a new region of the same size. This

cvs commit: src/lib/libc/stdlib malloc.c

2006-03-19 Thread Jason Evans
jasone 2006-03-20 04:05:05 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Separate completely full runs from runs that are merely almost full, so that no linear searching is necessary if we resort to allocating from a run that is known to be

cvs commit: src/lib/libc/stdlib malloc.c

2006-02-03 Thread Jason Evans
jasone 2006-02-04 01:11:30 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix calculation of the number of arenas to use on multi-processor systems. Revision ChangesPath 1.111 +1 -1 src/lib/libc/stdlib/malloc.c

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-27 Thread Gleb Smirnoff
On Fri, Jan 27, 2006 at 05:51:50AM +0300, Andrey Chernov wrote: A On Fri, Jan 27, 2006 at 02:36:44AM +, Jason Evans wrote: A jasone 2006-01-27 02:36:44 UTC A AFreeBSD src repository A AModified files: A lib/libc/stdlib malloc.c ALog: AClean up statistics

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-27 Thread Poul-Henning Kamp
In message [EMAIL PROTECTED], Andrey Chernov writes: Don't use -current if you can't tolerate the minor performance hit associated with making FreeBSD better. Don't ever try to tell anybody what to do if you don't know all his circumstacnes. Especially when being not asked. Why not, is that

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-27 Thread Ulrich Spoerlein
Gleb Smirnoff wrote: On Fri, Jan 27, 2006 at 05:51:50AM +0300, Andrey Chernov wrote: It is much easy to turn some tests off via malloc options than to comment out manually corresponding malloc.c defines after each cvsup. Just use CVS instead of cvsup, and you won't need to do any manual

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-27 Thread Ulrich Spoerlein
Ulrich Spörlein wrote: What about introducing the right make(1) magic to have NO_MALLOC_DEBUG=true work when put into make.conf? Ah, forget about it. I just read the follow-up commit. Ulrich Spoerlein -- PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-27 Thread John Baldwin
On Thursday 26 January 2006 22:02, Jason Evans wrote: On Jan 26, 2006, at 6:51 PM, Andrey Chernov wrote: I worry about my system performance. Could you please make all statistics and debug code conditional, debending on some flags which could be set as malloc options? Even in case this

cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Jason Evans
jasone 2006-01-26 08:11:23 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Optimize arena_bin_pop() to reduce the number of separator operations. Remove the block of code that tries to use delayed regions in LIFO order, since from a policy

cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Jason Evans
jasone 2006-01-27 02:36:44 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Clean up statistics gathering and printing. Revision ChangesPath 1.107 +64 -71src/lib/libc/stdlib/malloc.c

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Andrey Chernov
On Fri, Jan 27, 2006 at 02:36:44AM +, Jason Evans wrote: jasone 2006-01-27 02:36:44 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Clean up statistics gathering and printing. I worry about my system performance. Could you please make

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Jason Evans
On Jan 26, 2006, at 6:51 PM, Andrey Chernov wrote: I worry about my system performance. Could you please make all statistics and debug code conditional, debending on some flags which could be set as malloc options? Even in case this is a test period now, some people perhaps don't want some

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Andrey Chernov
On Thu, Jan 26, 2006 at 07:02:17PM -0800, Jason Evans wrote: Unfortunately, run-time checks for the debugging features are expensive, since the debugging code is scattered throughout malloc.c. This pretty much mandates compile-time configuration, for performance reasons. Checking one

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Andrey Chernov
On Thu, Jan 26, 2006 at 09:15:02PM -0600, Christian S.J. Peron wrote: These malloc debugging/stats features have been invaluable. I vote to accept the performance hit in exchange for useful debugging/stats features in -CURRENT, and disable them in -STABLE/-RELEASE when they are ready. You

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Scott Long
Jason Evans wrote: On Jan 26, 2006, at 6:51 PM, Andrey Chernov wrote: I worry about my system performance. Could you please make all statistics and debug code conditional, debending on some flags which could be set as malloc options? Even in case this is a test period now, some people

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Steve Kargl
On Fri, Jan 27, 2006 at 06:24:03AM +0300, Andrey Chernov wrote: On Thu, Jan 26, 2006 at 09:15:02PM -0600, Christian S.J. Peron wrote: These malloc debugging/stats features have been invaluable. I vote to accept the performance hit in exchange for useful debugging/stats features in

cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Jason Evans
jasone 2006-01-27 04:36:40 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Fix the type of a statistics counter (unsigned -- unsigned long). Revision ChangesPath 1.108 +1 -1 src/lib/libc/stdlib/malloc.c

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Andrey Chernov
On Thu, Jan 26, 2006 at 08:14:12PM -0800, Steve Kargl wrote: On Fri, Jan 27, 2006 at 06:24:03AM +0300, Andrey Chernov wrote: On Thu, Jan 26, 2006 at 09:15:02PM -0600, Christian S.J. Peron wrote: These malloc debugging/stats features have been invaluable. I vote to accept the performance

cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Jason Evans
jasone 2006-01-27 04:42:10 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Add NO_MALLOC_EXTRAS, so that various extra features that can cause performance degradation can be disabled via something like the following in /etc/malloc.conf:

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Steve Kargl
On Fri, Jan 27, 2006 at 07:38:43AM +0300, Andrey Chernov wrote: On Thu, Jan 26, 2006 at 08:14:12PM -0800, Steve Kargl wrote: On Fri, Jan 27, 2006 at 06:24:03AM +0300, Andrey Chernov wrote: On Thu, Jan 26, 2006 at 09:15:02PM -0600, Christian S.J. Peron wrote: These malloc debugging/stats

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Andrey Chernov
On Fri, Jan 27, 2006 at 04:42:10AM +, Jason Evans wrote: Add NO_MALLOC_EXTRAS, so that various extra features that can cause performance degradation can be disabled via something like the following in /etc/malloc.conf: CFLAGS+=-DNO_MALLOC_EXTRAS Thanx. You probably

Re: cvs commit: src/lib/libc/stdlib malloc.c

2006-01-26 Thread Jason Evans
On Jan 26, 2006, at 9:09 PM, Andrey Chernov wrote: On Fri, Jan 27, 2006 at 04:42:10AM +, Jason Evans wrote: Add NO_MALLOC_EXTRAS, so that various extra features that can cause performance degradation can be disabled via something like the following in /etc/malloc.conf:

  1   2   >