summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use KQU() rather than QU() where applicable.Jason Evans2014-05-295-1052/+1052
| | | | Fix KZI() and KQI() to append LL rather than ULL.
* Add size class computation capability.Jason Evans2014-05-299-91/+462
| | | | | | | 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.
* Use nallocx() rather than mallctl() to trigger initialization.Jason Evans2014-05-281-1/+1
| | | | | | Use nallocx() rather than mallctl() to trigger initialization, because nallocx() has no side effects other than initialization, whereas mallctl() does a bunch of internal memory allocation.
* Make sure initialization occurs prior to running tests.Jason Evans2014-05-281-1/+14
|
* STATIC_PAGE_SHIFT for cross-compiling jemallocDaniel Micay2014-05-281-1/+2
| | | | | | Sets `STATIC_PAGE_SHIFT` for cross-compiling jemalloc to 12. A shift of 12 represents a page size of 4k for practically all platforms.
* Fixup after 3a730df (Avoid pointer arithmetic on void*[...])Mike Hommey2014-05-281-2/+2
|
* Correctly return exit code from thd_join on WindowsMike Hommey2014-05-281-1/+2
|
* Define INFINITY when it's not definedMike Hommey2014-05-281-0/+6
|
* Move platform headers and tricks from jemalloc_internal.h.in to a new ↵Mike Hommey2014-05-284-56/+60
| | | | jemalloc_internal_decls.h header
* Use a configure test to detect the form of malloc_usable_size in malloc.hMike Hommey2014-05-271-2/+16
|
* Move __func__ to jemalloc_internal_macros.hMike Hommey2014-05-272-1/+4
| | | | test/integration/aligned_alloc.c needs it.
* Use ULL prefix instead of LLU for unsigned long longsMike Hommey2014-05-273-1005/+1005
| | | | MSVC only supports the former.
* Avoid pointer arithmetic on void* in test/integration/rallocx.cMike Hommey2014-05-271-3/+5
|
* Rename "small" local variable, because windows headers #define itMike Hommey2014-05-271-4/+4
|
* Use C99 varadic macros instead of GCC onesMike Hommey2014-05-272-196/+196
|
* Add missing $(EXE) to filter TESTS_UNIT_AUX_OBJSMike Hommey2014-05-271-1/+1
|
* Replace variable arrays in tests with VARIABLE_ARRAYMike Hommey2014-05-272-3/+3
|
* Define DLLEXPORT when building .jet objectsMike Hommey2014-05-271-1/+1
|
* Define _CRT_SPINCOUNT in test/src/mtx.c like in src/mutex.cMike Hommey2014-05-271-0/+4
|
* Fix manual dependency on jemalloc_test.hMike Hommey2014-05-271-1/+1
|
* Minor doc edit.Jason Evans2014-05-161-4/+4
|
* Merge branch 'pr/80' into devJason Evans2014-05-1629-423/+575
|\
| * Refactor huge allocation to be managed by arenas.Jason Evans2014-05-1628-466/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor huge allocation to be managed by arenas (though the global red-black tree of huge allocations remains for lookup during deallocation). This is the logical conclusion of recent changes that 1) made per arena dss precedence apply to huge allocation, and 2) made it possible to replace the per arena chunk allocation/deallocation functions. Remove the top level huge stats, and replace them with per arena huge stats. Normalize function names and types to *dalloc* (some were *dealloc*). Remove the --enable-mremap option. As jemalloc currently operates, this is a performace regression for some applications, but planned work to logarithmically space huge size classes should provide similar amortized performance. The motivation for this change was that mremap-based huge reallocation forced leaky abstractions that prevented refactoring.
| * Add support for user-specified chunk allocators/deallocators.aravind2014-05-1216-45/+283
|/ | | | | | | Add new mallctl endpoints "arena<i>.chunk.alloc" and "arena<i>.chunk.dealloc" to allow userspace to configure jemalloc's chunk allocator and deallocator on a per-arena basis.
* Merge pull request #82 from thestinger/newlineJason Evans2014-05-081-0/+1
|\ | | | | fix git handling of newlines on windows
| * fix git handling of newlines on windowsDaniel Micay2014-05-071-0/+1
|/ | | | | | By default, git will coerce LF to CRLF when files are checked out on Windows. This causes hard to diagnose errors when compiling with mingw-w64 from Windows rather than cross-compiling.
* Fix coding sytle nits.Jason Evans2014-05-013-7/+7
|
* Simplify backtracing.Jason Evans2014-04-234-91/+60
| | | | | | | | | | | Simplify backtracing to not ignore any frames, and compensate for this in pprof in order to increase flexibility with respect to function-based refactoring even in the presence of non-deterministic inlining. Modify pprof to blacklist all jemalloc allocation entry points including non-standard ones like mallocx(), and ignore all allocator-internal frames. Prior to this change, pprof excluded the specifically blacklisted functions from backtraces, but it left allocator-internal frames intact.
* Update libunwind configuration check to look for unw_backtrace().Jason Evans2014-04-231-1/+1
| | | | | Update libunwind configuration check to look for unw_backtrace(), which is a newer API not available in older versions of libunwind.
* Merge pull request #75 from luciang/devJason Evans2014-04-232-26/+11
|\ | | | | prof_backtrace: use unw_backtrace
| * prof_backtrace: use unw_backtraceLucian Adrian Grijincu2014-04-232-26/+11
|/ | | | | | unw_backtrace: - does internal per-thread caching - doesn't acquire an internal lock
* Refactor small_size2bin and small_bin2size.Jason Evans2014-04-175-29/+61
| | | | | Refactor small_size2bin and small_bin2size to be inline functions rather than directly accessed arrays.
* Fix debug-only compilation failures.Jason Evans2014-04-161-3/+2
| | | | | | | | Fix debug-only compilation failures introduced by changes to prof_sample_accum_update() in: 6c39f9e059d0825f4c29d8cec9f318b798912c3c refactor profiling. only use a bytes till next sample variable.
* Merge pull request #73 from bmaurer/smallmallocJason Evans2014-04-168-192/+192
|\ | | | | Smaller malloc hot path
| * Create a const array with only a small bin to size mapBen Maurer2014-04-165-7/+17
| |
| * refactor profiling. only use a bytes till next sample variable.Ben Maurer2014-04-163-152/+132
| |
| * outline rare tcache_get codepathsBen Maurer2014-04-163-33/+43
| |
* | Optimize Valgrind integration.Jason Evans2014-04-1512-136/+231
| | | | | | | | | | | | | | | | | | | | | | Forcefully disable tcache if running inside Valgrind, and remove Valgrind calls in tcache-specific code. Restructure Valgrind-related code to move most Valgrind calls out of the fast path functions. Take advantage of static knowledge to elide some branches in JEMALLOC_VALGRIND_REALLOC().
* | Remove the "opt.valgrind" mallctl.Jason Evans2014-04-157-41/+24
| | | | | | | | | | Remove the "opt.valgrind" mallctl because it is unnecessary -- jemalloc automatically detects whether it is running inside valgrind.
* | Remove the "arenas.purge" mallctl.Jason Evans2014-04-153-51/+1
| | | | | | | | | | Remove the "arenas.purge" mallctl, which was obsoleted by the "arena.<i>.purge" mallctl in 3.1.0.
* | Make dss non-optional, and fix an "arena.<i>.dss" mallctl bug.Jason Evans2014-04-1513-73/+72
| | | | | | | | | | | | | | Make dss non-optional on all platforms which support sbrk(2). Fix the "arena.<i>.dss" mallctl to return an error if "primary" or "secondary" precedence is specified, but sbrk(2) is not supported.
* | Reverse the cc-silence default.Jason Evans2014-04-152-9/+8
| | | | | | | | | | Replace --enable-cc-silence with --disable-cc-silence, so that by default people won't see spurious warnings when building jemalloc.
* | Update MALLOCX_ARENA() documentation.Jason Evans2014-04-151-4/+4
| | | | | | | | | | Update MALLOCX_ARENA() documentation to no longer claim that it has no effect for huge region allocations.
* | Remove the *allocm() API, which is superceded by the *allocx() API.Jason Evans2014-04-1514-558/+7
|/
* Remove support for non-prof-promote heap profiling metadata.Jason Evans2014-04-118-110/+28
| | | | | | | | | | | | | | | Make promotion of sampled small objects to large objects mandatory, so that profiling metadata can always be stored in the chunk map, rather than requiring one pointer per small region in each small-region page run. In practice the non-prof-promote code was only useful when using jemalloc to track all objects and report them as leaks at program exit. However, Valgrind is at least as good a tool for this particular use case. Furthermore, the non-prof-promote code is getting in the way of some optimizations that will make heap profiling much cheaper for the predominant use case (sampling a small representative proportion of all allocations).
* Merge pull request #70 from bmaurer/bitsplitrefactorJason Evans2014-04-101-36/+40
|\ | | | | refactoring for bits splitting
| * refactoring for bits splittingBen Maurer2014-04-101-36/+40
| |
* | Merge pull request #68 from bmaurer/noderefarenaJason Evans2014-04-103-9/+6
|\ \ | |/ |/| Don't dereference chunk->arena in free() hot path
| * Don't dereference chunk->arena in free() hot pathBen Maurer2014-04-053-9/+6
|/ | | | | | | | | | | | When you call free() we load chunk->arena even though that data isn't used on the tcache hot path. In profiling some FB applications, I found that ~30% of the dTLB misses in the free() function come from this line. With 4 MB chunks, the arena_chunk_t->map is ~ 32 KB (1024 pages in the chunk, 4 8 byte pointers in arena_chunk_map_t). This means there's only a 1/8 chance of the page containing chunk->arena also comtaining the map bits.
* Merge branch 'dev'3.6.0Jason Evans2014-03-3129-88/+177
|\