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). Suggested

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: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. Submitted

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 i

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 p

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 impro

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. S

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 i

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

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.

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 ker

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 chi

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 , 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 dea

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 probl

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 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 dss_chun

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 i

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

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-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. Thi

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-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 switching

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 a

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

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. T

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

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 cont

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: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: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 MALLOC_OPTIO

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

2007-10-10 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) Re

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 great

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 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 > >>> >

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 ChangesP

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 b

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 commi

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

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 co

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 c

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 obje

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 a

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 p

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: Andr

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] > Revision ChangesPa

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

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 1.1

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 pe

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 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-31 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 mai

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

2006-08-13 Thread Colin Percival
cperciva2006-08-13 21:54:47 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Correctly handle the case in calloc(num, size) where (size_t)(num * size) == 0 but both num and size are nonzero. Reported by:Ilja van Sprundel Approved by:

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 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.

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 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 src/lib/l

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 tha

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 whe

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 compatibilit

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-26 Thread Jason Evans
jasone 2006-04-27 01:03:00 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Change the semantics of brk_max to dynamically deal with data segment bounds. [1] Modify logic for utilizing the data segment, such that it is possible to create hug

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

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 leve

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]> R

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 ChangesP

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 lib

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 comm

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: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 viola

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 src/lib/libc/st

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-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 of

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. T

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 mo

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 im

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 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

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

2006-01-27 Thread Andrey Chernov
On Fri, Jan 27, 2006 at 09:45:46AM +0100, Poul-Henning Kamp wrote: > 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

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: AEC

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

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,

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> > A> > FreeBSD src repository A> > A> > Modified files: A> > lib/libc/stdlib malloc.c A> > Log: A> > Clean

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

2006-01-26 Thread Jason Evans
jasone 2006-01-27 07:46:22 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Remove unwarranted uses of 'goto'. Revision ChangesPath 1.110 +151 -201 src/lib/libc/stdlib/malloc.c ___ cvs-all@

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

2006-01-26 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Steve Kargl <[EMAIL PROTECTED]> writes: : 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

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: C

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 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 debuggi

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 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 perf

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 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 -

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 perha

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. Y

  1   2   >