- Mar 10, 2015
-
-
Jason Evans authored
-
- Mar 07, 2015
-
-
Jason Evans authored
This regression was introduced by 97c04a93 (Use first-fit rather than first-best-fit run/chunk allocation.).
-
Jason Evans authored
This tends to more effectively pack active memory toward low addresses. However, additional tree searches are required in many cases, so whether this change stands the test of time will depend on real-world benchmarks.
-
Jason Evans authored
Treat sizes that round down to the same size class as size-equivalent in trees that are used to search for first best fit, so that there are only as many "firsts" as there are size classes. This comes closer to the ideal of first fit.
-
Jason Evans authored
Recent changes have improved huge allocation scalability, which removes upward pressure to set the chunk size so large that huge allocations are rare. Smaller chunks are more likely to completely drain, so set the default to the smallest size that doesn't leave excessive unusable trailing space in chunk headers.
-
- Mar 04, 2015
-
-
Mike Hommey authored
TlsGetValue has a semantic difference with pthread_getspecific, in that it can return a non-error NULL value, so it always sets the LastError. But allocator callers may not be expecting calling e.g. free() to change the value of the last error, so preserve it.
-
Mike Hommey authored
9906660e added a --without-export configure option to avoid exporting jemalloc symbols, but the option didn't actually work.
-
- Feb 26, 2015
-
-
Dave Huseby authored
-
- Feb 19, 2015
-
-
Jason Evans authored
-
Jason Evans authored
These regressions were introduced by ee41ad40 (Integrate whole chunks into unused dirty page purging machinery.).
-
- Feb 18, 2015
-
-
Jason Evans authored
Rename "dirty chunks" to "cached chunks", in order to avoid overloading the term "dirty". Fix the regression caused by 339c2b23 (Fix chunk_unmap() to propagate dirty state.), and actually address what that change attempted, which is to only purge chunks once, and propagate whether zeroed pages resulted into chunk_record().
-
Jason Evans authored
Fix chunk_unmap() to propagate whether a chunk is dirty, and modify dirty chunk purging to record this information so it can be passed to chunk_unmap(). Since the broken version of chunk_unmap() claimed that all chunks were clean, this resulted in potential memory corruption for purging implementations that do not zero (e.g. MADV_FREE). This regression was introduced by ee41ad40 (Integrate whole chunks into unused dirty page purging machinery.).
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
-
- Feb 17, 2015
-
-
Jason Evans authored
Extend per arena unused dirty page purging to manage unused dirty chunks in aaddtion to unused dirty runs. Rather than immediately unmapping deallocated chunks (or purging them in the --disable-munmap case), store them in a separate set of trees, chunks_[sz]ad_dirty. Preferrentially allocate dirty chunks. When excessive unused dirty pages accumulate, purge runs and chunks in ingegrated LRU order (and unmap chunks in the --enable-munmap case). Refactor extent_node_t to provide accessor functions.
-
- Feb 16, 2015
-
-
Jason Evans authored
This regression was introduced by 88fef7ce (Refactor huge_*() calls into arena internals.), and went undetected because of the --enable-debug regression.
-
Jason Evans authored
This regression was introduced by 88fef7ce (Refactor huge_*() calls into arena internals.), and went undetected because of the --enable-debug regression.
-
Jason Evans authored
Fix --enable-debug to actually enable debug mode. This regression was introduced by cbf3a6d7 (Move centralized chunk management into arenas.).
-
Jason Evans authored
-
- Feb 15, 2015
-
-
Jason Evans authored
-
- Feb 14, 2015
-
-
Jason Evans authored
-
- Feb 13, 2015
-
-
Abhishek Kulkarni authored
Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
-
Dan McGregor authored
Also allow for the possibility that there exists a VERSION file in the srcroot, in case of building from a release tarball out of tree.
-
Dan McGregor authored
-
Jason Evans authored
Although exceedingly unlikely, it appears that writes to the prof_tctx field of arena_chunk_map_misc_t could be reordered such that a stale value could be read during deallocation, with profiler metadata corruption and invalid pointer dereferences being the most likely effects.
-
- Feb 12, 2015
-
-
Jason Evans authored
Make redirects to the huge_*() API the arena code's responsibility, since arenas now take responsibility for all allocation sizes.
-
Daniel Micay authored
8ddc9329 switched this to over using the address tree in order to avoid false negatives, so it now needs to check that the size of the free extent is large enough to satisfy the request.
-
Jason Evans authored
Migrate all centralized data structures related to huge allocations and recyclable chunks into arena_t, so that each arena can manage huge allocations and recyclable virtual memory completely independently of other arenas. Add chunk node caching to arenas, in order to avoid contention on the base allocator. Use chunks_rtree to look up huge allocations rather than a red-black tree. Maintain a per arena unsorted list of huge allocations (which will be needed to enumerate huge allocations during arena reset). Remove the --enable-ivsalloc option, make ivsalloc() always available, and use it for size queries if --enable-debug is enabled. The only practical implications to this removal are that 1) ivsalloc() is now always available during live debugging (and the underlying radix tree is available during core-based debugging), and 2) size query validation can no longer be enabled independent of --enable-debug. Remove the stats.chunks.{current,total,high} mallctls, and replace their underlying statistics with simpler atomically updated counters used exclusively for gdump triggering. These statistics are no longer very useful because each arena manages chunks independently, and per arena statistics provide similar information. Simplify chunk synchronization code, now that base chunk allocation cannot cause recursive lock acquisition.
-
Jason Evans authored
-
Jason Evans authored
Fix a serious regression in tcache_bin_flush_small() that was introduced by 1cb181ed (Implement explicit tcache support.).
-
- Feb 11, 2015
-
-
Jason Evans authored
-
- Feb 10, 2015
-
-
Jason Evans authored
-
Jason Evans authored
Add the MALLOCX_TCACHE() and MALLOCX_TCACHE_NONE macros, which can be used in conjunction with the *allocx() API. Add the tcache.create, tcache.flush, and tcache.destroy mallctls. This resolves #145.
-
Jason Evans authored
Fix arena_get() to refresh the cache as needed in the (!init_if_missing && refresh_if_missing) case. This flaw was introduced by the initial arena_get() implementation, which was part of 8bb3198f (Refactor/fix arenas manipulation.).
-
- Feb 05, 2015
-
-
Jason Evans authored
Recent huge allocation refactoring associates huge allocations with arenas, but it remains necessary to quickly look up huge allocation metadata during reallocation/deallocation. A global radix tree remains a good solution to this problem, but locking would have become the primary bottleneck after (upcoming) migration of chunk management from global to per arena data structures. This lock-free implementation uses double-checked reads to traverse the tree, so that in the steady state, each read or write requires only a single atomic operation. This implementation also assures that no more than two tree levels actually exist, through a combination of careful virtual memory allocation which makes large sparse nodes cheap, and skipping the root node on x64 (possible because the top 16 bits are all 0 in practice).
-
Jason Evans authored
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().
-
Jason Evans authored
Refactor base_alloc() to guarantee that allocations are carved from demand-zeroed virtual memory. This supports sparse data structures such as multi-page radix tree nodes. Enhance base_alloc() to keep track of fragments which were too small to support previous allocation requests, and try to consume them during subsequent requests. This becomes important when request sizes commonly approach or exceed the chunk size (as could radix tree node allocations).
-
Jason Evans authored
-
Jason Evans authored
- atomic_*_p(). - atomic_cas_*(). - atomic_write_*().
-