History log of /external/jemalloc/src/util.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
145f3cd17340ae3a1af8aad3bdce8ddcc626ec67 04-Dec-2016 Jason Evans <jasone@canonware.com> Add --disable-syscall.

This resolves #517.
/external/jemalloc/src/util.c
8f61fdedb908c29905103b22dda32ceb29cd8ede 28-Oct-2016 Jason Evans <jasone@canonware.com> Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).

This avoids warnings in some cases, and is otherwise generally good
hygiene.
/external/jemalloc/src/util.c
da206df10bc51f547d05563ebf17291f3f9471b0 03-Nov-2016 Jason Evans <jasone@canonware.com> Do not use syscall(2) on OS X 10.12 (deprecated).
/external/jemalloc/src/util.c
0bc716ae27d1bd66faa8f165a2c4a4cf6bd8143f 26-Mar-2016 Chris Peterson <cpeterson@mozilla.com> Fix -Wunreachable-code warning in malloc_vsnprintf().

Variables s and slen are declared inside a switch statement, but outside
a case scope. clang reports these variable definitions as "unreachable",
though this is not really meaningful in this case. This is the only
-Wunreachable-code warning in jemalloc.

src/util.c:501:5 [-Wunreachable-code] code will never be executed

This resolves #364.
/external/jemalloc/src/util.c
6c460ad91bf349ebac3b23e58d97769a982110fe 23-Mar-2016 Jason Evans <jasone@canonware.com> Optimize rtree_get().

Specialize fast path to avoid code that cannot execute for dependent
loads.

Manually unroll.
/external/jemalloc/src/util.c
22af74e10615ce6b6898ae38a378af27757f9e16 15-Mar-2016 Jason Evans <je@fb.com> Refactor out signed/unsigned comparisons.
/external/jemalloc/src/util.c
42ce80e15a5aa2ab6f2ec7e5f7c18164803f3076 26-Feb-2016 Jason Evans <jasone@canonware.com> Silence miscellaneous 64-to-32-bit data loss warnings.

This resolves #341.
/external/jemalloc/src/util.c
ca8fffb5c13b6a7c45fd034667a8910c61d09c3b 24-Feb-2016 Jason Evans <jasone@canonware.com> Silence miscellaneous 64-to-32-bit data loss warnings.
/external/jemalloc/src/util.c
9e1810ca9dc4a5f5f0841b9a6c1abb4337753552 24-Feb-2016 Jason Evans <je@fb.com> Silence miscellaneous 64-to-32-bit data loss warnings.
/external/jemalloc/src/util.c
f9e3459f751b08b3c2108fda7462827cf8a4f2af 12-Nov-2015 Jason Evans <je@fb.com> Tweak code to allow compilation of concatenated src/*.c sources.

This resolves #294.
/external/jemalloc/src/util.c
e42c309eba6c5084dc0abda9b211e91e2c548fdf 23-Jul-2015 Jason Evans <jasone@canonware.com> Add JEMALLOC_FORMAT_PRINTF().

Replace JEMALLOC_ATTR(format(printf, ...). with
JEMALLOC_FORMAT_PRINTF(), so that configuration feature tests can
omit the attribute if it would cause extraneous compilation warnings.
/external/jemalloc/src/util.c
f69e2f6fdab40c7612be5fd69960b8c7d40dba44 12-Mar-2015 Mike Hommey <mh@glandium.org> Use the error code given to buferror on Windows

a14bce85 made buferror not take an error code, and make the Windows
code path for buferror use GetLastError, while the alternative code
paths used errno. Then 2a83ed02 made buferror take an error code
again, and while it changed the non-Windows code paths to use that
error code, the Windows code path was not changed accordingly.
/external/jemalloc/src/util.c
008267b9f6a0e4d92a78f0e8c0697248020fc8d3 03-Feb-2015 Felix Janda <felix.janda@posteo.de> util.c: strerror_r returns char* only on glibc
/external/jemalloc/src/util.c
551ebc43647521bdd0bc78558b106762b3388928 03-Oct-2014 Jason Evans <jasone@canonware.com> Convert to uniform style: cond == false --> !cond
/external/jemalloc/src/util.c
70807bc54b06bb259b6607541af44bc73a890bf6 29-May-2014 Chris Peterson <cpeterson@mozilla.com> Fix -Wsometimes-uninitialized warnings
/external/jemalloc/src/util.c
3e310b34eb53eb331981ecda2ea5f10cf6956747 29-May-2014 Chris Peterson <cpeterson@mozilla.com> Fix -Wsign-compare warnings
/external/jemalloc/src/util.c
0c4e743eaf2ab6bcfd56e002fb82f95801b9292e 22-Jan-2014 Jason Evans <je@fb.com> Test and fix malloc_printf("%%").
/external/jemalloc/src/util.c
e18c25d23de0e845f0ee7e11d02c1be044738a3c 07-Jan-2014 Jason Evans <je@fb.com> Add util unit tests, and fix discovered bugs.

Add unit tests for pow2_ceil(), malloc_strtoumax(), and
malloc_snprintf().

Fix numerous bugs in malloc_strotumax() error handling/reporting. These
bugs could have caused application-visible issues for some seldom used
(0X... and 0... prefixes) or malformed MALLOC_CONF or mallctl() argument
strings, but otherwise they had no impact.

Fix numerous bugs in malloc_snprintf(). These bugs were not exercised
by existing malloc_*printf() calls, so they had no impact.
/external/jemalloc/src/util.c
a4f124f59fa5f702231432a7e5fa45140ba81e2a 09-Dec-2013 Jason Evans <jasone@canonware.com> Normalize #define whitespace.

Consistently use a tab rather than a space following #define.
/external/jemalloc/src/util.c
2a83ed0284e92c7ba4bd4efe9df149ac724b2f26 09-Dec-2013 Jason Evans <jasone@canonware.com> Refactor tests.

Refactor tests to use explicit testing assertions, rather than diff'ing
test output. This makes the test code a bit shorter, more explicitly
encodes testing intent, and makes test failure diagnosis more
straightforward.
/external/jemalloc/src/util.c
6556e28be15d9acd8f3835fb9fad90145e1edbff 21-Oct-2013 Jason Evans <je@fb.com> Prefer not_reached() over assert(false) where appropriate.
/external/jemalloc/src/util.c
35579afb55c0a53261743b3e292f60e76046ff16 26-Sep-2012 Corey Richardson <corey@octayn.net> Remove unused variable and branch (reported by clang-analzyer)
/external/jemalloc/src/util.c
3597e91482c804592105ea078a0825fdb7c68dff 02-May-2012 Mike Hommey <mh@glandium.org> Allow je_malloc_message to be overridden when linking statically

If an application wants to override je_malloc_message, it is better to define
the symbol locally than to change its value in main(), which might be too late
for various reasons.

Due to je_malloc_message being initialized in util.c, statically linking
jemalloc with an application defining je_malloc_message fails due to
"multiple definition of" the symbol.

Defining it without a value (like je_malloc_conf) makes it more easily
overridable.
/external/jemalloc/src/util.c
889ec59bd3ae3190fb715e64d8d15b6a1b47314a 02-May-2012 Jason Evans <jasone@canonware.com> Make malloc_write() non-inline.

Make malloc_write() non-inline, in order to resolve its dependency on
je_malloc_write().
/external/jemalloc/src/util.c
da99e31105eb709ef4ec8a120b115c32a6b9723a 30-Apr-2012 Mike Hommey <mh@glandium.org> Replace JEMALLOC_ATTR with various different macros when it makes sense

Theses newly added macros will be used to implement the equivalent under
MSVC. Also, move the definitions to headers, where they make more sense,
and for some, are even more useful there (e.g. malloc).
/external/jemalloc/src/util.c
a14bce85e885f83c96116cc5438ae52d740f3727 30-Apr-2012 Mike Hommey <mh@glandium.org> Use Get/SetLastError on Win32

Using errno on win32 doesn't quite work, because the value set in a shared
library can't be read from e.g. an executable calling the function setting
errno.

At the same time, since buferror always uses errno/GetLastError, don't pass
it.
/external/jemalloc/src/util.c
08e2221e99ef96277331f43e87d3f3ff770d27a7 20-Apr-2012 Mike Hommey <mh@glandium.org> Remove leftovers from the vsnprintf check in malloc_vsnprintf

Commit 4eeb52f removed vsnprintf validation, but left a now unused va_copy.
It so happens that MSVC doesn't support va_copy.
/external/jemalloc/src/util.c
a19e87fbad020e8dd3d26682032929e8e5ae71c1 22-Apr-2012 Mike Hommey <mh@glandium.org> Add support for Mingw
/external/jemalloc/src/util.c
1ad56385adc40cfbca1b14c240a9c647135ac641 18-Apr-2012 Mike Hommey <mh@glandium.org> Fix malloc_vsnprintf handling of %o, %u and %x

These flags take unsigned values, but they were fed with signed values
taken with va_arg, and that led to sign extension in cases where the
corresponding value has the most significant bit set.
/external/jemalloc/src/util.c
a1ee7838e14b321a97bfacb1f1cf5004198f2203 11-Apr-2012 Jason Evans <je@fb.com> Rename labels.

Rename labels from FOO to label_foo in order to avoid system macro
definitions, in particular OUT and ERROR on mingw.

Reported by Mike Hommey.
/external/jemalloc/src/util.c
4eeb52f080edb1f4b518249388f6c617386c00e5 02-Apr-2012 Jason Evans <jasone@canonware.com> Remove vsnprintf() and strtoumax() validation.

Remove code that validates malloc_vsnprintf() and malloc_strtoumax()
against their namesakes. The validation code has adequately served its
usefulness at this point, and it isn't worth dealing with the different
formatting for %p with glibc versus other implementations for NULL
pointers ("(nil)" vs. "0x0").

Reported by Mike Hommey.
/external/jemalloc/src/util.c
1a0e7770243e0539fa8fef7bb1512f784f93389f 27-Mar-2012 Mike Hommey <mh@glandium.org> Add a SYS_write definition on systems where it is not defined in headers

Namely, in the Android NDK headers, SYS_write is not defined; but
__NR_write is.
/external/jemalloc/src/util.c
41b6afb834b1f5250223678c52bd4f013d4234f6 03-Feb-2012 Jason Evans <jasone@canonware.com> Port to FreeBSD.

Use FreeBSD-specific functions (_pthread_mutex_init_calloc_cb(),
_malloc_{pre,post}fork()) to avoid bootstrapping issues due to
allocation in libc and libthr.

Add malloc_strtoumax() and use it instead of strtoul(). Disable
validation code in malloc_vsnprintf() and malloc_strtoumax() until
jemalloc is initialized. This is necessary because locale
initialization causes allocation for both vsnprintf() and strtoumax().

Force the lazy-lock feature on in order to avoid pthread_self(),
because it causes allocation.

Use syscall(SYS_write, ...) rather than write(...), because libthr wraps
write() and causes allocation. Without this workaround, it would not be
possible to print error messages in malloc_conf_init() without
substantially reworking bootstrapping.

Fix choose_arena_hard() to look at how many threads are assigned to the
candidate choice, rather than checking whether the arena is
uninitialized. This bug potentially caused more arenas to be
initialized than necessary.
/external/jemalloc/src/util.c
9225a1991a58190207cca2ff3cdba966bb322dd5 23-Mar-2012 Jason Evans <je@fb.com> Add JEMALLOC_CC_SILENCE_INIT().

Add JEMALLOC_CC_SILENCE_INIT(), which provides succinct syntax for
initializing a variable to avoid a spurious compiler warning.
/external/jemalloc/src/util.c
cd9a1346e96f71bdecdc654ea50fc62d76371e74 22-Mar-2012 Jason Evans <je@fb.com> Implement tsd.

Implement tsd, which is a TLS/TSD abstraction that uses one or both
internally. Modify bootstrapping such that no tsd's are utilized until
allocation is safe.

Remove malloc_[v]tprintf(), and use malloc_snprintf() instead.

Fix %p argument size handling in malloc_vsnprintf().

Fix a long-standing statistics-related bug in the "thread.arena"
mallctl that could cause crashes due to linked list corruption.
/external/jemalloc/src/util.c
824d34e5b7f5cf00bf472ec79f7ec1c6e3474114 13-Mar-2012 Jason Evans <je@fb.com> Modify malloc_vsnprintf() validation code.

Modify malloc_vsnprintf() validation code to verify that output is
identical to vsnprintf() output, even if both outputs are truncated due
to buffer exhaustion.
/external/jemalloc/src/util.c
7cca6085754736c7e4e51d27e2f0234e84806628 12-Mar-2012 Jason Evans <je@fb.com> Remove extra '}'.
/external/jemalloc/src/util.c
d81e4bdd5c991bd5642c8b859ef1f752b51cd9be 06-Mar-2012 Jason Evans <je@fb.com> Implement malloc_vsnprintf().

Implement malloc_vsnprintf() (a subset of vsnprintf(3)) as well as
several other printing functions based on it, so that formatted printing
can be relied upon without concern for inducing a dependency on floating
point runtime support. Replace malloc_write() calls with
malloc_*printf() where doing so simplifies the code.

Add name mangling for library-private symbols in the data and BSS
sections. Adjust CONF_HANDLE_*() macros in malloc_conf_init() to expose
all opt_* variable use to cpp so that proper mangling occurs.
/external/jemalloc/src/util.c