The NetBSD Project

CVS log for src/lib/libc/stdlib/jemalloc.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libc / stdlib

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.64 / (download) - annotate - [select for diffs], Wed Dec 13 23:53:50 2023 UTC (4 months ago) by mrg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.63: +3 -4 lines
Diff to previous 1.63 (colored) to selected 1.53 (colored)

make malloc_usable_size() visible with old jemalloc.

it's in <malloc.h> and applications like firefox expect it.

XXX: pullup-10

Revision 1.63 / (download) - annotate - [select for diffs], Sat Oct 14 19:39:33 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.62: +6 -6 lines
Diff to previous 1.62 (colored) to selected 1.53 (colored)

A few more branch hints.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Oct 14 19:38:51 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.61: +11 -2 lines
Diff to previous 1.61 (colored) to selected 1.53 (colored)

Cherry pick a fix from FreeBSD:

commit 80bc871bdd4a8254ce19a65a54c8c918dd3ddd11
Author: Konstantin Belousov <kib@FreeBSD.org>
Date:   Sat Sep 12 18:16:46 2009 +0000

    MFC r196861:
    Handle zero size for posix_memalign. Return NULL or unique address
    according to the 'V' option.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Oct 14 19:37:24 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.60: +4 -4 lines
Diff to previous 1.60 (colored) to selected 1.53 (colored)

Cherry pick a fix from FreeBSD:

commit 52d7a117c0fe8bd0226d964f4272131700035f12
Author: Jason Evans <jasone@FreeBSD.org>
Date:   Thu Aug 14 17:03:29 2008 +0000

    Re-order the terms of an expression in arena_run_reg_dalloc() to correctly
    detect whether the integer division table is large enough to handle the
    divisor.  Before this change, the last two table elements were never used,
    thus causing the slow path to be used for those divisors.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Oct 14 19:36:17 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.59: +5 -5 lines
Diff to previous 1.59 (colored) to selected 1.53 (colored)

Fix a bug in the rbtree conversion.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Oct 14 06:29:10 2023 UTC (6 months ago) by mrg
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored) to selected 1.53 (colored)

fix compile error on 32-bit platforms.

Revision 1.58 / (download) - annotate - [select for diffs], Fri Oct 13 20:57:30 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.57: +114 -120 lines
Diff to previous 1.57 (colored) to selected 1.53 (colored)

Convert to use Matt Thomas's rbtree, which the env code probably already
pulls into libc.  amd64 object size before and after:

	   text    data     bss     dec     hex filename
	  21001      88     365   21454    53ce jemalloc.po
	  14991     184     429   15604    3cf4 jemalloc.po

libmicro on AMD Athlon Silver 3050e comparing this and the revision before
previous (i.e. the old code, versus arena changes + rbtree changes):

	exit_10_nolibc	135.168300	128.07790[   +5.5%]
        fork_100        180.539040      149.63721[  +20.7%]
        fork_1000       200.421650      167.09660[  +19.9%]
	mallocT2_10	0.132920	0.13317[   -0.2%]
	mallocT2_100	0.136350	0.13635[   +0.0%]
	mallocT2_100k	0.258690	0.26641[   -3.0%]
	mallocT2_10k	0.223340	0.22733[   -1.8%]
	mallocT2_1k	0.137170	0.14254[   -3.9%]
	malloc_10	0.100540	0.10849[   -7.9%]
	malloc_100	0.107290	0.10753[   -0.2%]
	malloc_100k	0.193560	0.19355[   +0.0%]
	malloc_10k	0.173250	0.17454[   -0.7%]
	malloc_1k	0.113490	0.11335[   +0.1%]

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 13 19:30:28 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.56: +103 -274 lines
Diff to previous 1.56 (colored) to selected 1.53 (colored)

Minor changes to jemalloc100 (the old one that only vax etc currently uses).

- Don't use TLS nor pretend to hash out arenas to reduce lock contention,
  because NetBSD uses thr_curcpu() to choose arena (i.e. per-CPU arenas).

- In a single threaded process, don't prepare "ncpus" worth of arenas,
  allocate only one.

- Use getpagesize() since it caches the return.

- Sprinkle branch hints.

- Make MALLOC_TRACE and MALLOC_DEBUG work again.

Revision 1.56 / (download) - annotate - [select for diffs], Sun May 7 12:41:47 2023 UTC (11 months, 1 week ago) by skrll
Branch: MAIN
Changes since 1.55: +14 -3 lines
Diff to previous 1.55 (colored) to selected 1.53 (colored)

RISC-V support that works on QEMU with a single hart.

Thanks for Simon Burge for plic(4).

Revision 1.55 / (download) - annotate - [select for diffs], Wed Nov 30 04:35:53 2022 UTC (16 months, 2 weeks ago) by skrll
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC1
Branch point for: netbsd-10
Changes since 1.54: +9 -9 lines
Diff to previous 1.54 (colored) to selected 1.53 (colored)

Trailing whitespace

Revision 1.54 / (download) - annotate - [select for diffs], Mon Aug 30 13:12:16 2021 UTC (2 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.53: +5 -30 lines
Diff to previous 1.53 (colored)

Remove lint workarounds

Revision 1.53 / (download) - annotate - [selected], Fri May 15 14:37:21 2020 UTC (3 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.52: +22 -2 lines
Diff to previous 1.52 (colored)

Hook up proper fork lock handling for malloc:
- lock all relevant mutexes just before fork
- unlock all mutexes just after fork in the parent
- full reinit non-spinlocks in the child
This is not using the normal pthread_atfork interface to ensure order of
operation, malloc is used as implementation detail too often.

Revision 1.52 / (download) - annotate - [select for diffs], Sun May 3 07:32:54 2020 UTC (3 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.51: +5 -2 lines
Diff to previous 1.51 (colored) to selected 1.53 (colored)

turn off TLS for mips on old jemalloc.  it doesn't work.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Apr 22 08:48:12 2020 UTC (3 years, 11 months ago) by rin
Branch: MAIN
Changes since 1.50: +4 -4 lines
Diff to previous 1.50 (colored) to selected 1.53 (colored)

Use __mc68010__ to distinguish m68000 (sun2) from other m68k ports;
__mc68000__ is defined both for m68000 and m68k.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Apr 22 08:45:06 2020 UTC (3 years, 11 months ago) by rin
Branch: MAIN
Changes since 1.49: +5 -5 lines
Diff to previous 1.49 (colored) to selected 1.53 (colored)

Fix previous for libhack, where _REENTRANT is not defined;
arenas_map_key is used only when NO_TLS && _REENTRANT.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Apr 21 22:22:55 2020 UTC (3 years, 11 months ago) by joerg
Branch: MAIN
Changes since 1.48: +13 -8 lines
Diff to previous 1.48 (colored) to selected 1.53 (colored)

Switch to using TLS in old jemalloc for everywhere but VAX and sun2.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jan 13 19:14:37 2020 UTC (4 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp
Changes since 1.47: +13 -10 lines
Diff to previous 1.47 (colored) to selected 1.53 (colored)

Fix atfork malloc handling to include all the locks in old jemalloc.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Jan 13 19:14:02 2020 UTC (4 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.53 (colored)

Fix aarch64 definition in old jemalloc

There is no platform-specific reason for avoiding TLS. The tiny
allocations should be aligned the same as small allocations for ABI
reasons.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Mar 28 15:05:03 2019 UTC (5 years ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.45: +4 -2 lines
Diff to previous 1.45 (colored) to selected 1.53 (colored)

fix compilation for non _REENTRANT

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jul 25 20:05:35 2018 UTC (5 years, 8 months ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.44: +6 -6 lines
Diff to previous 1.44 (colored) to selected 1.53 (colored)

Avoid undefined behavior in left bit shift in jemalloc(3)

Change the type of shifted value to unsigned to prevent altering the
signedness bit.

jemalloc.c:1707:14, left shift of 1 by 31 places cannot be represented in type 'int'
jemalloc.c:1724:15, left shift of 1 by 31 places cannot be represented in type 'int'
jemalloc.c:1840:28, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Dec 1 22:47:06 2017 UTC (6 years, 4 months ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.43: +13 -13 lines
Diff to previous 1.43 (colored) to selected 1.53 (colored)

normalise some indentation.  NFC.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Nov 16 13:54:00 2017 UTC (6 years, 5 months ago) by skrll
Branch: MAIN
Changes since 1.42: +3 -2 lines
Diff to previous 1.42 (colored) to selected 1.53 (colored)

The HPPA architectures (1.1 and 2.0) both define quadruple-word (128-bit)
floating point types.  Adjust alignment to match.

Revision 1.42 / (download) - annotate - [select for diffs], Fri May 19 19:55:16 2017 UTC (6 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.41: +2 -6 lines
Diff to previous 1.41 (colored) to selected 1.53 (colored)

remove accidental __strong_alias additions, noticed by coypu.

Revision 1.41 / (download) - annotate - [select for diffs], Fri May 19 19:51:10 2017 UTC (6 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.40: +7 -23 lines
Diff to previous 1.40 (colored) to selected 1.53 (colored)

use strerror_r_ss()

Revision 1.40 / (download) - annotate - [select for diffs], Tue Apr 12 18:07:08 2016 UTC (8 years ago) by joerg
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.39: +41 -18 lines
Diff to previous 1.39 (colored) to selected 1.53 (colored)

lib/50791: Instead of using sorting the arena chunks by address only,
sort by size of the longest run and address as tie break. Avoids long
linear searches for code heavy on medium sized allocations.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jan 24 21:56:43 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored) to selected 1.53 (colored)

vmparam.h is a kernel header.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jul 26 17:21:55 2015 UTC (8 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.37: +48 -15 lines
Diff to previous 1.37 (colored) to selected 1.53 (colored)

Defer using pthread keys until we are threaded.
From Christos, fixes PR port-arm/50087 by allowing malloc calls prior
to libpthread initialization.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jan 20 18:31:25 2015 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.36: +12 -2 lines
Diff to previous 1.36 (colored) to selected 1.53 (colored)

Fix non _REENTRANT build.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Sep 19 17:42:19 2014 UTC (9 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.35: +10 -5 lines
Diff to previous 1.35 (colored) to selected 1.53 (colored)

Tell it about riscv.  Fix mips64 case so that SIZEOF_PTR_2POW is 3.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Sep 3 19:29:40 2014 UTC (9 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.34: +7 -2 lines
Diff to previous 1.34 (colored) to selected 1.53 (colored)

OR1K support

Revision 1.34 / (download) - annotate - [select for diffs], Sun Aug 10 05:57:31 2014 UTC (9 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: tls-maxphys-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Branch point for: netbsd-7
Changes since 1.33: +7 -2 lines
Diff to previous 1.33 (colored) to selected 1.53 (colored)

Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jul 16 19:09:53 2014 UTC (9 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.32: +2 -4 lines
Diff to previous 1.32 (colored) to selected 1.53 (colored)

Hold arenas_mtx across (still unused) _malloc_pre/postfork (PR 47428).

Revision 1.32 / (download) - annotate - [select for diffs], Tue Feb 25 12:13:19 2014 UTC (10 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored) to selected 1.53 (colored)

Powerpc seems to expect minimum 8 byte alignment from malloc as well.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Feb 17 08:50:50 2014 UTC (10 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.30: +12 -2 lines
Diff to previous 1.30 (colored) to selected 1.53 (colored)

Bounce the minimum allocation alignement for sparc64 and amd64 as well,
to sync with their default gcc configuration.
We could relax this again later, after a filing a defect report with the
ISO C comitee and getting an answer contradicting the gcc teams
interpretation (and then fix the gcc target configurations instead).

Revision 1.30 / (download) - annotate - [select for diffs], Wed Feb 5 11:32:15 2014 UTC (10 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.29: +9 -3 lines
Diff to previous 1.29 (colored) to selected 1.53 (colored)

Err on the safe side for small memory allocations and provide 4byte
alignment by default.  Override this to 8byte alignment for alpha and arm
eabi.

Someone (tm) can review this change once the standards and compiler(s)
have sorted themselves out.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Sep 12 15:35:15 2013 UTC (10 years, 7 months ago) by joerg
Branch: MAIN
Changes since 1.28: +2 -7 lines
Diff to previous 1.28 (colored) to selected 1.53 (colored)

NetBSD certainly supports TLS in static applications if it supports TLS
on the platform at all.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Mar 21 14:32:22 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.27: +12 -12 lines
Diff to previous 1.27 (colored) to selected 1.53 (colored)

rename umax2s->size_t2s function per apb's request.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 21 10:10:36 2012 UTC (12 years, 1 month ago) by matt
Branch: MAIN
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored) to selected 1.53 (colored)

Use C89 function definition

Revision 1.26 / (download) - annotate - [select for diffs], Wed Mar 21 09:49:02 2012 UTC (12 years, 1 month ago) by he
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) to selected 1.53 (colored)

Cast an int argument to umax2s() to size_t.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Mar 21 00:38:06 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.24: +5 -5 lines
Diff to previous 1.24 (colored) to selected 1.53 (colored)

uintmax_t -> size_t (never called with larger than size_t)

Revision 1.24 / (download) - annotate - [select for diffs], Wed May 18 01:59:39 2011 UTC (12 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, netbsd-6
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored) to selected 1.53 (colored)

cleanup saving and restoring errno, and make it similar.

Revision 1.23 / (download) - annotate - [select for diffs], Fri May 13 23:11:00 2011 UTC (12 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.22: +5 -2 lines
Diff to previous 1.22 (colored) to selected 1.53 (colored)

don't let readlink trash errno.;

Revision 1.22 / (download) - annotate - [select for diffs], Sat Feb 26 23:27:49 2011 UTC (13 years, 1 month ago) by njoly
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.21: +21 -18 lines
Diff to previous 1.21 (colored) to selected 1.53 (colored)

Switch from floating point to fixed point integer for run sizes maths.
From FreeBSD (part of revision 1.154).

Revision 1.21 / (download) - annotate - [select for diffs], Thu Mar 4 22:48:31 2010 UTC (14 years, 1 month ago) by enami
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-base
Branch point for: bouyer-quota2
Changes since 1.20: +28 -15 lines
Diff to previous 1.20 (colored) to selected 1.53 (colored)

Fix race condition on reallocation of huge category.

We need to remove the old region before mremap() since if it relesae the
old region, other thread may map it for the same huge category allocation
and insert it to the tree before we acquire a lock after mremap().

Fixes PR/42876.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Feb 12 03:11:01 2009 UTC (15 years, 2 months ago) by lukem
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.19: +7 -12 lines
Diff to previous 1.19 (colored) to selected 1.53 (colored)

Apply some of FreeBSD libc/stdlib/malloc.c rev 1.162
to fix sign-compare issues.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jun 23 10:46:25 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, christos-time_t-nbase, christos-time_t-base
Branch point for: netbsd-5, matt-nb5-mips64, jym-xensuspend, christos-time_t
Changes since 1.18: +18 -9 lines
Diff to previous 1.18 (colored) to selected 1.53 (colored)

Split choose_arena() back out into inline and non-inline portions.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jun 5 00:16:34 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored) to selected 1.53 (colored)

Check to see if MALLOC_OPTIONS is actually set in the environment before
doing issetugid().

Revision 1.17 / (download) - annotate - [select for diffs], Sat Mar 8 13:17:13 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, matt-armv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-nbase
Branch point for: yamt-pf42, wrstuden-revivesa
Changes since 1.16: +31 -53 lines
Diff to previous 1.16 (colored) to selected 1.53 (colored)

Redo the CPU-based arena selection slightly differently. With the latest
libpthread and kernel, this mysteriously works without a problem.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Dec 4 17:43:51 2007 UTC (16 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: matt-armv6-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Branch point for: keiichi-mipv6
Changes since 1.15: +42 -22 lines
Diff to previous 1.15 (colored) to selected 1.53 (colored)

- use a non localized version of strerror_r.
- kill localized declarations and let namespace.h do its work.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Dec 1 22:44:44 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.14: +82 -41 lines
Diff to previous 1.14 (colored) to selected 1.53 (colored)

Back out the per-cpu arena changes. With this, ld.so magically stops
loading libc/libpthread twice -- which does not make sense, because it
has its own private malloc().

Revision 1.14 / (download) - annotate - [select for diffs], Fri Nov 30 17:44:38 2007 UTC (16 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored) to selected 1.53 (colored)

Fix the other half of the 'store int as a thread specific pointer'/

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 30 17:09:22 2007 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.53 (colored)

converting a pointer to unsigned is bad; use uintptr_t.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Nov 29 18:46:13 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.11: +41 -82 lines
Diff to previous 1.11 (colored) to selected 1.53 (colored)

Make the allocation arenas per-CPU in the most optimistic case, but
continue to 'stripe' by thread in case of contention.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Nov 19 14:48:42 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.10: +2 -5 lines
Diff to previous 1.10 (colored) to selected 1.53 (colored)

Enable posix_memalign().

Revision 1.10 / (download) - annotate - [select for diffs], Mon Oct 22 04:16:48 2007 UTC (16 years, 6 months ago) by simonb
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.9: +12 -8 lines
Diff to previous 1.9 (colored) to selected 1.53 (colored)

Revert the CSE parts of the previous change.  "run" is calculated with
a different value for "pageind" each time through the loop, so we can't
precalculate it.

Fixes awk core dump issues on powerpc 405.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Oct 19 19:28:57 2007 UTC (16 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.8: +46 -46 lines
Diff to previous 1.8 (colored) to selected 1.53 (colored)

- do some CSE.
- pass lint

Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 16 15:12:16 2007 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.7: +74 -5 lines
Diff to previous 1.7 (colored) to selected 1.53 (colored)

use mremap for huge -> huge realloc.
fix PR/31425 (Nicolas Joly) and possibly PR/36175 (Brian de Alwis).

Revision 1.7 / (download) - annotate - [select for diffs], Mon Oct 15 10:30:56 2007 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.6: +9 -5 lines
Diff to previous 1.6 (colored) to selected 1.53 (colored)

make lint happy.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 15 10:28:10 2007 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.5: +3 -4 lines
Diff to previous 1.5 (colored) to selected 1.53 (colored)

malloc_print_stats: print huge_allocated correctly.  it's already in bytes.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Oct 15 00:05:00 2007 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.4: +17 -26 lines
Diff to previous 1.4 (colored) to selected 1.53 (colored)

use MAP_ALIGNED.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Oct 9 00:59:52 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.3: +7 -2 lines
Diff to previous 1.3 (colored) to selected 1.53 (colored)

Add defs for hppa. From he@.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Oct 7 21:45:18 2007 UTC (16 years, 6 months ago) by he
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored) to selected 1.53 (colored)

On sparc64, both __sparc__ and __sparc64__ is defined.  Avoid redefinition
of size constants for sparc64.

This code still produces many, many lint warnings due to "may loose accuracy"
when mixing long/int, and also warnings related to <<.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Oct 5 23:42:23 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.1: +143 -104 lines
Diff to previous 1.1 (colored) to selected 1.53 (colored)

Port to NetBSD. Note: posix_memalign() is here, but it's not exported
via the headers yet.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Oct 5 23:39:58 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Diff to selected 1.53 (colored)

Pull in jemalloc from FreeBSD:

FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>