fc11f3cb8443c029f54bf9ba21574b0f61996dd2 |
|
22-Nov-2016 |
Jason Evans <jasone@canonware.com> |
Enable overriding JEMALLOC_{ALLOC,FREE}_JUNK. This resolves #509.
/external/jemalloc/include/jemalloc/internal/util.h
|
d1207f0d371eade218f7572743b5eddedc7fff94 |
|
17-Jun-2016 |
Elliot Ronaghan <ronawho@gmail.com> |
Check for __builtin_unreachable at configure time Add a configure check for __builtin_unreachable instead of basing its availability on the __GNUC__ version. On OS X using gcc (a real gcc, not the bundled version that's just a gcc front-end) leads to a linker assertion: https://github.com/jemalloc/jemalloc/issues/266 It turns out that this is caused by a gcc bug resulting from the use of __builtin_unreachable(): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438 To work around this bug, check that __builtin_unreachable() actually works at configure time, and if it doesn't use abort() instead. The check is based on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438#c21. With this `make check` passes with a homebrew installed gcc-5 and gcc-6.
/external/jemalloc/include/jemalloc/internal/util.h
|
96aa67aca89725f0b1df3257421a3d0a48eb2700 |
|
05-Apr-2016 |
Jason Evans <jasone@canonware.com> |
Clean up char vs. uint8_t in junk filling code. Consistently use uint8_t rather than char for junk filling code.
/external/jemalloc/include/jemalloc/internal/util.h
|
a82070ef5fc3aa81fda43086cdcc22bfa826b894 |
|
28-Mar-2016 |
Chris Peterson <cpeterson@mozilla.com> |
Add JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macros Replace hardcoded 0xa5 and 0x5a junk values with JEMALLOC_ALLOC_JUNK and JEMALLOC_FREE_JUNK macros, respectively.
/external/jemalloc/include/jemalloc/internal/util.h
|
af3184cac0e0c70045d8158b9c176696f2ca1090 |
|
24-Mar-2016 |
Jason Evans <jasone@canonware.com> |
Use abort() for fallback implementations of unreachable().
/external/jemalloc/include/jemalloc/internal/util.h
|
22af74e10615ce6b6898ae38a378af27757f9e16 |
|
15-Mar-2016 |
Jason Evans <je@fb.com> |
Refactor out signed/unsigned comparisons.
/external/jemalloc/include/jemalloc/internal/util.h
|
aa63d5d377b4508b83502e923690d1d7b67c8c88 |
|
24-Feb-2016 |
Jason Evans <jasone@canonware.com> |
Fix ffs_zu() compilation error on MinGW. This regression was caused by 9f4ee6034c3ac6a8c8b5f9a0d76822fb2fd90c41 (Refactor jemalloc_ffs*() into ffs_*().).
/external/jemalloc/include/jemalloc/internal/util.h
|
1c42a04cc6d3cc5d92bec55432015785584a4b0d |
|
24-Feb-2016 |
Jason Evans <je@fb.com> |
Change lg_floor() return type from size_t to unsigned.
/external/jemalloc/include/jemalloc/internal/util.h
|
9f4ee6034c3ac6a8c8b5f9a0d76822fb2fd90c41 |
|
24-Feb-2016 |
Jason Evans <je@fb.com> |
Refactor jemalloc_ffs*() into ffs_*(). Use appropriate versions to resolve 64-to-32-bit data loss warnings.
/external/jemalloc/include/jemalloc/internal/util.h
|
ecae12323d44cd739662051a2b9a5965cbe0e965 |
|
21-Feb-2016 |
Jason Evans <jasone@canonware.com> |
Fix overflow in prng_range(). Add jemalloc_ffs64() and use it instead of jemalloc_ffsl() in prng_range(), since long is not guaranteed to be a 64-bit type.
/external/jemalloc/include/jemalloc/internal/util.h
|
34676d33690f6cc6885ff769e537ca940aacf886 |
|
10-Feb-2016 |
Jason Evans <je@fb.com> |
Refactor prng* from cpp macros into inline functions. Remove 32-bit variant, convert prng64() to prng_lg_range(), and add prng_range().
/external/jemalloc/include/jemalloc/internal/util.h
|
f9e3459f751b08b3c2108fda7462827cf8a4f2af |
|
12-Nov-2015 |
Jason Evans <je@fb.com> |
Tweak code to allow compilation of concatenated src/*.c sources. This resolves #294.
/external/jemalloc/include/jemalloc/internal/util.h
|
fead75fd52acec0c7a4b6a6e39a25d3de8fbedc2 |
|
13-Aug-2015 |
Jason Evans <jasone@canonware.com> |
Fix gcc build failure (define __has_builtin).
/external/jemalloc/include/jemalloc/internal/util.h
|
7928f62273e43bf4e22c664916fb1486329bae48 |
|
13-Aug-2015 |
Jason Evans <jasone@canonware.com> |
Check whether gcc version supports __builtin_unreachable().
/external/jemalloc/include/jemalloc/internal/util.h
|
67c46a9e5366b3461d9f1e733129c792628c337b |
|
01-Aug-2015 |
Daniel Micay <danielmicay@gmail.com> |
work around _FORTIFY_SOURCE false positive In builds with profiling disabled (default), the opt_prof_prefix array has a one byte length as a micro-optimization. This will cause the usage of write in the unused profiling code to be statically detected as a buffer overflow by Bionic's _FORTIFY_SOURCE implementation as it tries to detect read overflows in addition to write overflows. This works around the problem by informing the compiler that not_reached() means code in unreachable in release builds.
/external/jemalloc/include/jemalloc/internal/util.h
|
71cd2f08ff1775c1265d0b4a7967f10da867bd83 |
|
24-Jul-2015 |
Jason Evans <jasone@canonware.com> |
Leave PRI* macros defined after using them to define FMT*. Macro expansion happens too late for the #undef directives to work as a mechanism for preventing accidental direct use of the PRI* macros.
/external/jemalloc/include/jemalloc/internal/util.h
|
5fae7dc1b316d0e93aa20cc3aaf050f509aec705 |
|
23-Jul-2015 |
Jason Evans <jasone@canonware.com> |
Fix MinGW-related portability issues. Create and use FMT* macros that are equivalent to the PRI* macros that inttypes.h defines. This allows uniform use of the Unix-specific format specifiers, e.g. "%zu", as well as avoiding Windows-specific definitions of e.g. PRIu64. Add ffs()/ffsl() support for compiling with gcc. Extract compatibility definitions of ENOENT, EINVAL, EAGAIN, EPERM, ENOMEM, and ENORANGE into include/msvc_compat/windows_extra.h and use the file for tests as well as for core jemalloc code.
/external/jemalloc/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
8ad6bf360f9ca5c6c9a1d8e5825ee473bb4697da |
|
21-Mar-2015 |
Igor Podlesny <user.email@poige.ru> |
Fix indentation inconsistencies.
/external/jemalloc/include/jemalloc/internal/util.h
|
c810fcea1fa7983ef5bcabe6556cdc19dde6dd8d |
|
05-Feb-2015 |
Jason Evans <jasone@canonware.com> |
Add (x != 0) assertion to lg_floor(x). lg_floor(0) is undefined, but depending on compiler options may not cause a crash. This assertion makes it harder to accidentally abuse lg_floor().
/external/jemalloc/include/jemalloc/internal/util.h
|
e12eaf93dca308a426c182956197b0eeb5f2cff3 |
|
08-Dec-2014 |
Jason Evans <je@fb.com> |
Style and spelling fixes.
/external/jemalloc/include/jemalloc/internal/util.h
|
112704cfbfacfc9cecdfb732741df47eb4133902 |
|
22-Sep-2014 |
Dave Rigby <daver@couchbase.com> |
Use MSVC intrinsics for lg_floor When using MSVC make use of its intrinsic functions (supported on x86, amd64 & ARM) for lg_floor.
/external/jemalloc/include/jemalloc/internal/util.h
|
23fdf8b359a690f457c5300338f4994d06402b95 |
|
09-Sep-2014 |
Daniel Micay <danielmicay@gmail.com> |
mark some conditions as unlikely * assertion failure * malloc_init failure * malloc not already initialized (in malloc_init) * running in valgrind * thread cache disabled at runtime Clang and GCC already consider a comparison with NULL or -1 to be cold, so many branches (out-of-memory) are already correctly considered as cold and marking them is not important.
/external/jemalloc/include/jemalloc/internal/util.h
|
6b5609d23bf49423fdc6506281e0deac7c3a524e |
|
09-Sep-2014 |
Daniel Micay <danielmicay@gmail.com> |
add likely / unlikely macros
/external/jemalloc/include/jemalloc/internal/util.h
|
9c3a10fdf6baa5ddb042b6adbef1ff1b3c613ce3 |
|
29-May-2014 |
Richard Diamond <wichard@vitalitystudios.com> |
Try to use __builtin_ffsl if ffsl is unavailable. Some platforms (like those using Newlib) don't have ffs/ffsl. This commit adds a check to configure.ac for __builtin_ffsl if ffsl isn't found. __builtin_ffsl performs the same function as ffsl, and has the added benefit of being available on any platform utilizing Gcc-compatible compiler. This change does not address the used of ffs in the MALLOCX_ARENA() macro.
/external/jemalloc/include/jemalloc/internal/util.h
|
0b5c92213fbafc52c5b5a5dc84e91eacc812ae0b |
|
02-Jun-2014 |
Jason Evans <jasone@canonware.com> |
Fix fallback lg_floor() implementations.
/external/jemalloc/include/jemalloc/internal/util.h
|
d04047cc29bbc9d1f87a9346d1601e3dd87b6ca0 |
|
29-May-2014 |
Jason Evans <je@fb.com> |
Add size class computation capability. Add size class computation capability, currently used only as validation of the size class lookup tables. Generalize the size class spacing used for bins, for eventual use throughout the full range of allocation sizes.
/external/jemalloc/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
a4f124f59fa5f702231432a7e5fa45140ba81e2a |
|
09-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Normalize #define whitespace. Consistently use a tab rather than a space following #define.
/external/jemalloc/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
86abd0dcd8e478759fe409d338d11558c4cec427 |
|
01-Dec-2013 |
Jason Evans <jasone@canonware.com> |
Refactor to support more varied testing. Refactor the test harness to support three types of tests: - unit: White box unit tests. These tests have full access to all internal jemalloc library symbols. Though in actuality all symbols are prefixed by jet_, macro-based name mangling abstracts this away from test code. - integration: Black box integration tests. These tests link with the installable shared jemalloc library, and with the exception of some utility code and configure-generated macro definitions, they have no access to jemalloc internals. - stress: Black box stress tests. These tests link with the installable shared jemalloc library, as well as with an internal allocator with symbols prefixed by jet_ (same as for unit tests) that can be used to allocate data structures that are internal to the test code. Move existing tests into test/{unit,integration}/ as appropriate. Split out internal parts of jemalloc_defs.h.in and put them in jemalloc_internal_defs.h.in. This reduces internals exposure to applications that #include <jemalloc/jemalloc.h>. Refactor jemalloc.h header generation so that a single header file results, and the prototypes can be used to generate jet_ prototypes for tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in, jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and use a shell script to generate a unified jemalloc.h at configure time. Change the default private namespace prefix from "" to "je_". Add missing private namespace mangling. Remove hard-coded private_namespace.h. Instead generate it and private_unnamespace.h from private_symbols.txt. Use similar logic for public symbols, which aids in name mangling for jet_ symbols. Add test_warn() and test_fail(). Replace existing exit(1) calls with test_fail() calls.
/external/jemalloc/include/jemalloc/internal/util.h
|
6556e28be15d9acd8f3835fb9fad90145e1edbff |
|
21-Oct-2013 |
Jason Evans <je@fb.com> |
Prefer not_reached() over assert(false) where appropriate.
/external/jemalloc/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
7cdea3973cab8640d1f44c7638ed5e30ed18be24 |
|
30-Apr-2012 |
Mike Hommey <mh@glandium.org> |
Few configure.ac adjustments - Use the extensions autoconf finds for object and executable files. - Remove the sorev variable, and replace SOREV definition with sorev's. - Default to je_ prefix on win32.
/external/jemalloc/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
122449b073bcbaa504c4f592ea2d733503c272d2 |
|
06-Apr-2012 |
Jason Evans <je@fb.com> |
Implement Valgrind support, redzones, and quarantine. Implement Valgrind support, as well as the redzone and quarantine features, which help Valgrind detect memory errors. Redzones are only implemented for small objects because the changes necessary to support redzones around large and huge objects are complicated by in-place reallocation, to the point that it isn't clear that the maintenance burden is worth the incremental improvement to Valgrind support. Merge arena_salloc() and arena_salloc_demote(). Refactor i[v]salloc() to expose the 'demote' option.
/external/jemalloc/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|
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/include/jemalloc/internal/util.h
|