History log of /external/jemalloc/src/util.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
338c9bf92ebf4e196bc9bbaf845b85b66ee2c77b 29-May-2014 Chris Peterson <cpeterson@mozilla.com> Fix -Wsometimes-uninitialized warnings
/external/jemalloc/src/util.c
932d77dc8089af14d4d334188aa800d405fc51f6 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