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.46 / (download) - annotate - [select for diffs], Thu Mar 28 15:05:03 2019 UTC (8 months, 2 weeks ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RC1, netbsd-9, HEAD
Changes since 1.45: +4 -2 lines
Diff to previous 1.45 (colored)

fix compilation for non _REENTRANT

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jul 25 20:05:35 2018 UTC (16 months, 2 weeks 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)

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 (2 years 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)

normalise some indentation.  NFC.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Nov 16 13:54:00 2017 UTC (2 years ago) by skrll
Branch: MAIN
Changes since 1.42: +3 -2 lines
Diff to previous 1.42 (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 (2 years, 6 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)

remove accidental __strong_alias additions, noticed by coypu.

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

use strerror_r_ss()

Revision 1.40 / (download) - annotate - [select for diffs], Tue Apr 12 18:07:08 2016 UTC (3 years, 7 months 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)

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 (3 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

vmparam.h is a kernel header.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jul 26 17:21:55 2015 UTC (4 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.37: +48 -15 lines
Diff to previous 1.37 (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 (4 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.36: +12 -2 lines
Diff to previous 1.36 (colored)

Fix non _REENTRANT build.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Sep 19 17:42:19 2014 UTC (5 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.35: +10 -5 lines
Diff to previous 1.35 (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 (5 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.34: +7 -2 lines
Diff to previous 1.34 (colored)

OR1K support

Revision 1.34 / (download) - annotate - [select for diffs], Sun Aug 10 05:57:31 2014 UTC (5 years, 4 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)

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 (5 years, 4 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.32: +2 -4 lines
Diff to previous 1.32 (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 (5 years, 9 months 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)

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 (5 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.30: +12 -2 lines
Diff to previous 1.30 (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 (5 years, 10 months ago) by skrll
Branch: MAIN
Changes since 1.29: +9 -3 lines
Diff to previous 1.29 (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 (6 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.28: +2 -7 lines
Diff to previous 1.28 (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 (7 years, 8 months 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)

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 (7 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored)

Use C89 function definition

Revision 1.26 / (download) - annotate - [select for diffs], Wed Mar 21 09:49:02 2012 UTC (7 years, 8 months ago) by he
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (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 (7 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.24: +5 -5 lines
Diff to previous 1.24 (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 (8 years, 6 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)

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 (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.22: +5 -2 lines
Diff to previous 1.22 (colored)

don't let readlink trash errno.;

Revision 1.22 / (download) - annotate - [select for diffs], Sat Feb 26 23:27:49 2011 UTC (8 years, 9 months ago) by njoly
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.21: +21 -18 lines
Diff to previous 1.21 (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 (9 years, 9 months 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)

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 (10 years, 10 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)

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 (11 years, 5 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)

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 (11 years, 6 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)

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 (11 years, 9 months 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)

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 (12 years 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)

- 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 (12 years ago) by ad
Branch: MAIN
Changes since 1.14: +82 -41 lines
Diff to previous 1.14 (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 (12 years ago) by dsl
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (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 (12 years ago) by christos
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (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 (12 years ago) by ad
Branch: MAIN
Changes since 1.11: +41 -82 lines
Diff to previous 1.11 (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 (12 years ago) by ad
Branch: MAIN
Changes since 1.10: +2 -5 lines
Diff to previous 1.10 (colored)

Enable posix_memalign().

Revision 1.10 / (download) - annotate - [select for diffs], Mon Oct 22 04:16:48 2007 UTC (12 years, 1 month ago) by simonb
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.9: +12 -8 lines
Diff to previous 1.9 (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 (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.8: +46 -46 lines
Diff to previous 1.8 (colored)

- do some CSE.
- pass lint

Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 16 15:12:16 2007 UTC (12 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.7: +74 -5 lines
Diff to previous 1.7 (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 (12 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.6: +9 -5 lines
Diff to previous 1.6 (colored)

make lint happy.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 15 10:28:10 2007 UTC (12 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.5: +3 -4 lines
Diff to previous 1.5 (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 (12 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.4: +17 -26 lines
Diff to previous 1.4 (colored)

use MAP_ALIGNED.

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

Add defs for hppa. From he@.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Oct 7 21:45:18 2007 UTC (12 years, 2 months ago) by he
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (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 (12 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.1: +143 -104 lines
Diff to previous 1.1 (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 (12 years, 2 months ago) by ad
Branch: MAIN

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>