f674f43893d6282bf6e728c510b901a10b38bc48 |
|
30-Jan-2017 |
Jason Evans <jasone@canonware.com> |
Fix/refactor tcaches synchronization. Synchronize tcaches with tcaches_mtx rather than ctl_mtx. Add missing synchronization for tcache flushing. This bug was introduced by 1cb181ed632e7573fb4eab194e4d216867222d27 (Implement explicit tcache support.), which was first released in 4.0.0. (cherry picked from commit 3ecc3c84862ef3e66b20be8213b0301c06c692cc) Bug: 35867477 Test: Booted angler using normal config and svelte config. Test: Ran bionic unit tests/jemalloc tests. Test: Ran the art ThreadStress tests on the normal config/svelte config. Change-Id: I8de25e7eae8f0b055febafee1b5e4d170371bbcd
/external/jemalloc/src/ctl.c
|
962a2979e353f876f3725417179f201e671d9dbb |
|
21-Oct-2016 |
Jason Evans <jasone@canonware.com> |
Do not (recursively) allocate within tsd_fetch(). Refactor tsd so that tsdn_fetch() does not trigger allocation, since allocation could cause infinite recursion. This resolves #458.
/external/jemalloc/src/ctl.c
|
e2bcf037d445a84a71c7997670819ebd0a893b4a |
|
13-Oct-2016 |
Jason Evans <jasone@canonware.com> |
Make dss operations lockless. Rather than protecting dss operations with a mutex, use atomic operations. This has negligible impact on synchronization overhead during typical dss allocation, but is a substantial improvement for chunk_in_dss() and the newly added chunk_dss_mergeable(), which can be called multiple times during chunk deallocations. This change also has the advantage of avoiding tsd in deallocation paths associated with purging, which resolves potential deadlocks during thread exit due to attempted tsd resurrection. This resolves #425.
/external/jemalloc/src/ctl.c
|
c1e00ef2a6442d1d047950247c757821560db329 |
|
11-May-2016 |
Jason Evans <jasone@canonware.com> |
Resolve bootstrapping issues when embedded in FreeBSD libc. b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online locking validator.) caused a broad propagation of tsd throughout the internal API, but tsd_fetch() was designed to fail prior to tsd bootstrapping. Fix this by splitting tsd_t into non-nullable tsd_t and nullable tsdn_t, and modifying all internal APIs that do not critically rely on tsd to take nullable pointers. Furthermore, add the tsd_booted_get() function so that tsdn_fetch() can probe whether tsd bootstrapping is complete and return NULL if not. All dangerous conversions of nullable pointers are tsdn_tsd() calls that assert-fail on invalid conversion.
/external/jemalloc/src/ctl.c
|
04c3c0f9a0c910589a75604d8d0405407f1f035d |
|
04-May-2016 |
Jason Evans <jasone@canonware.com> |
Add the stats.retained and stats.arenas.<i>.retained statistics. This resolves #367.
/external/jemalloc/src/ctl.c
|
90827a3f3ef2099dcd480d542aacc9f44a0787e8 |
|
04-May-2016 |
Jason Evans <jasone@canonware.com> |
Fix huge_palloc() regression. Split arena_choose() into arena_[i]choose() and use arena_ichoose() for arena lookup during internal allocation. This fixes huge_palloc() so that it always succeeds during extent node allocation. This regression was introduced by 66cd953514a18477eb49732e40d5c2ab5f1b12c5 (Do not allocate metadata via non-auto arenas, nor tcaches.).
/external/jemalloc/src/ctl.c
|
19ff2cefba48d1ddab8fb52e3d78f309ca2553cf |
|
22-Apr-2016 |
Jason Evans <jasone@canonware.com> |
Implement the arena.<i>.reset mallctl. This makes it possible to discard all of an arena's allocations in a single operation. This resolves #146.
/external/jemalloc/src/ctl.c
|
66cd953514a18477eb49732e40d5c2ab5f1b12c5 |
|
22-Apr-2016 |
Jason Evans <jasone@canonware.com> |
Do not allocate metadata via non-auto arenas, nor tcaches. This assures that all internally allocated metadata come from the first opt_narenas arenas, i.e. the automatically multiplexed arenas.
/external/jemalloc/src/ctl.c
|
b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 |
|
14-Apr-2016 |
Jason Evans <jasone@canonware.com> |
Add witness, a simple online locking validator. This resolves #358.
/external/jemalloc/src/ctl.c
|
3c07f803aa282598451eb0664cc94717b769a5e6 |
|
28-Feb-2016 |
Jason Evans <jasone@canonware.com> |
Fix stats.arenas.<i>.[...] for --disable-stats case. Add missing stats.arenas.<i>.{dss,lg_dirty_mult,decay_time} initialization. Fix stats.arenas.<i>.{pactive,pdirty} to read under the protection of the arena mutex.
/external/jemalloc/src/ctl.c
|
767d85061a6fb88ec977bbcd9b429a43aff391e6 |
|
25-Feb-2016 |
Jason Evans <je@fb.com> |
Refactor arenas array (fixes deadlock). Refactor the arenas array, which contains pointers to all extant arenas, such that it starts out as a sparse array of maximum size, and use double-checked atomics-based reads as the basis for fast and simple arena_get(). Additionally, reduce arenas_lock's role such that it only protects against arena initalization races. These changes remove the possibility for arena lookups to trigger locking, which resolves at least one known (fork-related) deadlock. This resolves #315.
/external/jemalloc/src/ctl.c
|
9e1810ca9dc4a5f5f0841b9a6c1abb4337753552 |
|
24-Feb-2016 |
Jason Evans <je@fb.com> |
Silence miscellaneous 64-to-32-bit data loss warnings.
/external/jemalloc/src/ctl.c
|
8f683b94a751c65af8f9fa25970ccf2917b96bb8 |
|
24-Feb-2016 |
Jason Evans <je@fb.com> |
Make opt_narenas unsigned rather than size_t.
/external/jemalloc/src/ctl.c
|
8dd5115edee9e778d3b45d0924530ee49a4e34e6 |
|
24-Feb-2016 |
Jason Evans <je@fb.com> |
Explicitly cast mib[] elements to unsigned where appropriate.
/external/jemalloc/src/ctl.c
|
243f7a0508bb014c2a7bf592c466a923911db234 |
|
20-Feb-2016 |
Jason Evans <jasone@canonware.com> |
Implement decay-based unused dirty page purging. This is an alternative to the existing ratio-based unused dirty page purging, and is intended to eventually become the sole purging mechanism. Add mallctls: - opt.purge - opt.decay_time - arena.<i>.decay - arena.<i>.decay_time - arenas.decay_time - stats.arenas.<i>.decay_time This resolves #325.
/external/jemalloc/src/ctl.c
|
f829009929bdce17bef8a963264a92e39271a166 |
|
07-Feb-2016 |
Jason Evans <je@fb.com> |
Add --with-malloc-conf. Add --with-malloc-conf, which makes it possible to embed a default options string during configuration.
/external/jemalloc/src/ctl.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/ctl.c
|
b49a334a645b854dbb1649f15c38d646fee66738 |
|
28-Jul-2015 |
Jason Evans <je@fb.com> |
Generalize chunk management hooks. Add the "arena.<i>.chunk_hooks" mallctl, which replaces and expands on the "arena.<i>.chunk.{alloc,dalloc,purge}" mallctls. The chunk hooks allow control over chunk allocation/deallocation, decommit/commit, purging, and splitting/merging, such that the application can rely on jemalloc's internal chunk caching and retaining functionality, yet implement a variety of chunk management mechanisms and policies. Merge the chunks_[sz]ad_{mmap,dss} red-black trees into chunks_[sz]ad_retained. This slightly reduces how hard jemalloc tries to honor the dss precedence setting; prior to this change the precedence setting was also consulted when recycling chunks. Fix chunk purging. Don't purge chunks in arena_purge_stashed(); instead deallocate them in arena_unstash_purged(), so that the dirty memory linkage remains valid until after the last time it is used. This resolves #176 and #201.
/external/jemalloc/src/ctl.c
|
f2bc85298c1cd6f4e95fbbeeb7ccc32ff52a1d8f |
|
18-Jul-2015 |
Jason Evans <jasone@canonware.com> |
Add the config.cache_oblivious mallctl.
/external/jemalloc/src/ctl.c
|
562d266511053a51406e91c78eba640cb46ad9c8 |
|
25-Mar-2015 |
Jason Evans <jasone@canonware.com> |
Add the "stats.arenas.<i>.lg_dirty_mult" mallctl.
/external/jemalloc/src/ctl.c
|
d324ca8933d4f9c3bca7e552be9805525726d1be |
|
24-Mar-2015 |
Jason Evans <jasone@canonware.com> |
Fix arena_get() usage. Fix arena_get() calls that specify refresh_if_missing=false. In ctl_refresh() and ctl.c's arena_purge(), these calls attempted to only refresh once, but did so in an unreliable way. arena_i_lg_dirty_mult_ctl() was simply wrong to pass refresh_if_missing=false.
/external/jemalloc/src/ctl.c
|
4acd75a694173186e9e0399d2855f05ce8553008 |
|
24-Mar-2015 |
Jason Evans <jasone@canonware.com> |
Add the "stats.allocated" mallctl.
/external/jemalloc/src/ctl.c
|
8d6a3e8321a7767cb2ca0930b85d5d488a8cc659 |
|
19-Mar-2015 |
Jason Evans <je@fb.com> |
Implement dynamic per arena control over dirty page purging. Add mallctls: - arenas.lg_dirty_mult is initialized via opt.lg_dirty_mult, and can be modified to change the initial lg_dirty_mult setting for newly created arenas. - arena.<i>.lg_dirty_mult controls an individual arena's dirty page purging threshold, and synchronously triggers any purging that may be necessary to maintain the constraint. - arena.<i>.chunk.purge allows the per arena dirty page purging function to be replaced. This resolves #93.
/external/jemalloc/src/ctl.c
|
cbf3a6d70371d2390b8b0e76814e04cc6088002c |
|
11-Feb-2015 |
Jason Evans <jasone@canonware.com> |
Move centralized chunk management into arenas. 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.
/external/jemalloc/src/ctl.c
|
1cb181ed632e7573fb4eab194e4d216867222d27 |
|
30-Jan-2015 |
Jason Evans <je@fb.com> |
Implement explicit tcache support. 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.
/external/jemalloc/src/ctl.c
|
5b8ed5b7c91939f64f14fc48be84ed20e3f023f4 |
|
26-Jan-2015 |
Jason Evans <jasone@canonware.com> |
Implement the prof.gdump mallctl. This feature makes it possible to toggle the gdump feature on/off during program execution, whereas the the opt.prof_dump mallctl value can only be set during program startup. This resolves #72.
/external/jemalloc/src/ctl.c
|
4581b97809e7e545c38b996870a4e7284a620bc5 |
|
27-Nov-2014 |
Jason Evans <je@fb.com> |
Implement metadata statistics. There are three categories of metadata: - Base allocations are used for bootstrap-sensitive internal allocator data structures. - Arena chunk headers comprise pages which track the states of the non-metadata pages. - Internal allocations differ from application-originated allocations in that they are for internal use, and that they are omitted from heap profiles. The metadata statistics comprise the metadata categories as follows: - stats.metadata: All metadata -- base + arena chunk headers + internal allocations. - stats.arenas.<i>.metadata.mapped: Arena chunk headers. - stats.arenas.<i>.metadata.allocated: Internal allocations. This is reported separately from the other metadata statistics because it overlaps with the allocated and active statistics, whereas the other metadata statistics do not. Base allocations are not reported separately, though their magnitude can be computed by subtracting the arena-specific metadata. This resolves #163.
/external/jemalloc/src/ctl.c
|
10aff3f3e1b8b3ac0348b259c439c9fe870a6b95 |
|
21-Jan-2015 |
Jason Evans <jasone@canonware.com> |
Refactor bootstrapping to delay tsd initialization. Refactor bootstrapping to delay tsd initialization, primarily to support integration with FreeBSD's libc. Refactor a0*() for internal-only use, and add the bootstrap_{malloc,calloc,free}() API for use by FreeBSD's libc. This separation limits use of the a0*() functions to metadata allocation, which doesn't require malloc/calloc/free API compatibility. This resolves #170.
/external/jemalloc/src/ctl.c
|
2c5cb613dfbdf58f88152321b63e60c58cd23972 |
|
08-Dec-2014 |
Guilherme Goncalves <guilherme.p.gonc@gmail.com> |
Introduce two new modes of junk filling: "alloc" and "free". In addition to true/false, opt.junk can now be either "alloc" or "free", giving applications the possibility of junking memory only on allocation or deallocation. This resolves #172.
/external/jemalloc/src/ctl.c
|
af1f5927633ee2cb98c095de0fcc67b8aacdc9c0 |
|
31-Oct-2014 |
Jason Evans <jasone@canonware.com> |
Use JEMALLOC_INLINE_C everywhere it's appropriate.
/external/jemalloc/src/ctl.c
|
3c4d92e82a31f652a7c77ca937a02d0185085b06 |
|
13-Oct-2014 |
Jason Evans <jasone@canonware.com> |
Add per size class huge allocation statistics. Add per size class huge allocation statistics, and normalize various stats: - Change the arenas.nlruns type from size_t to unsigned. - Add the arenas.nhchunks and arenas.hchunks.<i>.size mallctl's. - Replace the stats.arenas.<i>.bins.<j>.allocated mallctl with stats.arenas.<i>.bins.<j>.curregs . - Add the stats.arenas.<i>.hchunks.<j>.nmalloc, stats.arenas.<i>.hchunks.<j>.ndalloc, stats.arenas.<i>.hchunks.<j>.nrequests, and stats.arenas.<i>.hchunks.<j>.curhchunks mallctl's.
/external/jemalloc/src/ctl.c
|
8bb3198f72fc7587dc93527f9f19fb5be52fa553 |
|
08-Oct-2014 |
Jason Evans <jasone@canonware.com> |
Refactor/fix arenas manipulation. Abstract arenas access to use arena_get() (or a0get() where appropriate) rather than directly reading e.g. arenas[ind]. Prior to the addition of the arenas.extend mallctl, the worst possible outcome of directly accessing arenas was a stale read, but arenas.extend may allocate and assign a new array to arenas. Add a tsd-based arenas_cache, which amortizes arenas reads. This introduces some subtle bootstrapping issues, with tsd_boot() now being split into tsd_boot[01]() to support tsd wrapper allocation bootstrapping, as well as an arenas_cache_bypass tsd variable which dynamically terminates allocation of arenas_cache itself. Promote a0malloc(), a0calloc(), and a0free() to be generally useful for internal allocation, and use them in several places (more may be appropriate). Abstract arena->nthreads management and fix a missing decrement during thread destruction (recent tsd refactoring left arenas_cleanup() unused). Change arena_choose() to propagate OOM, and handle OOM in all callers. This is important for providing consistent allocation behavior when the MALLOCX_ARENA() flag is being used. Prior to this fix, it was possible for an OOM to result in allocation silently allocating from a different arena than the one specified.
/external/jemalloc/src/ctl.c
|
155bfa7da18cab0d21d87aa2dce4554166836f5d |
|
06-Oct-2014 |
Jason Evans <jasone@canonware.com> |
Normalize size classes. Normalize size classes to use the same number of size classes per size doubling (currently hard coded to 4), across the intire range of size classes. Small size classes already used this spacing, but in order to support this change, additional small size classes now fill [4 KiB .. 16 KiB). Large size classes range from [16 KiB .. 4 MiB). Huge size classes now support non-multiples of the chunk size in order to fill (4 MiB .. 16 MiB).
/external/jemalloc/src/ctl.c
|
029d44cf8b22aa7b749747bfd585887fb59e0030 |
|
04-Oct-2014 |
Jason Evans <jasone@canonware.com> |
Fix tsd cleanup regressions. Fix tsd cleanup regressions that were introduced in 5460aa6f6676c7f253bfcb75c028dfd38cae8aaf (Convert all tsd variables to reside in a single tsd structure.). These regressions were twofold: 1) tsd_tryget() should never (and need never) return NULL. Rename it to tsd_fetch() and simplify all callers. 2) tsd_*_set() must only be called when tsd is in the nominal state, because cleanup happens during the nominal-->purgatory transition, and re-initialization must not happen while in the purgatory state. Add tsd_nominal() and use it as needed. Note that tsd_*{p,}_get() can still be used as long as no re-initialization that would require cleanup occurs. This means that e.g. the thread_allocated counter can be updated unconditionally.
/external/jemalloc/src/ctl.c
|
fc12c0b8bc1160530d1e3e641b76d2a4f793136f |
|
04-Oct-2014 |
Jason Evans <jasone@canonware.com> |
Implement/test/fix prof-related mallctl's. Implement/test/fix the opt.prof_thread_active_init, prof.thread_active_init, and thread.prof.active mallctl's. Test/fix the thread.prof.name mallctl. Refactor opt_prof_active to be read-only and move mutable state into the prof_active variable. Stop leaning on ctl-related locking for protection.
/external/jemalloc/src/ctl.c
|
551ebc43647521bdd0bc78558b106762b3388928 |
|
03-Oct-2014 |
Jason Evans <jasone@canonware.com> |
Convert to uniform style: cond == false --> !cond
/external/jemalloc/src/ctl.c
|
5460aa6f6676c7f253bfcb75c028dfd38cae8aaf |
|
23-Sep-2014 |
Jason Evans <jasone@canonware.com> |
Convert all tsd variables to reside in a single tsd structure.
/external/jemalloc/src/ctl.c
|
602c8e0971160e4b85b08b16cf8a2375aa24bc04 |
|
19-Aug-2014 |
Jason Evans <jasone@canonware.com> |
Implement per thread heap profiling. Rename data structures (prof_thr_cnt_t-->prof_tctx_t, prof_ctx_t-->prof_gctx_t), and convert to storing a prof_tctx_t for sampled objects. Convert PROF_ALLOC_PREP() to prof_alloc_prep(), since precise backtrace depth within jemalloc functions is no longer an issue (pprof prunes irrelevant frames). Implement mallctl's: - prof.reset implements full sample data reset, and optional change of sample interval. - prof.lg_sample reads the current sample interval (opt.lg_prof_sample was the permanent source of truth prior to prof.reset). - thread.prof.name provides naming capability for threads within heap profile dumps. - thread.prof.active makes it possible to activate/deactivate heap profiling for individual threads. Modify the heap dump files to contain per thread heap profile data. This change is incompatible with the existing pprof, which will require enhancements to read and process the enriched data.
/external/jemalloc/src/ctl.c
|
586c8ede42d7d0545d36d9cbb0235fb39221ef3e |
|
15-Aug-2014 |
Jason Evans <jasone@canonware.com> |
Fix arena.<i>.dss mallctl to handle read-only calls.
/external/jemalloc/src/ctl.c
|
e2deab7a751c8080c2b2cdcfd7b11887332be1bb |
|
16-May-2014 |
Jason Evans <je@fb.com> |
Refactor huge allocation to be managed by arenas. 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.
/external/jemalloc/src/ctl.c
|
fb7fe50a88ca9bde74e9a401ae17ad3b15bbae28 |
|
06-May-2014 |
aravind <aravind@fb.com> |
Add support for user-specified chunk allocators/deallocators. 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.
/external/jemalloc/src/ctl.c
|
ecd3e59ca351d7111ec72a327fe0c009f2aa69a0 |
|
15-Apr-2014 |
Jason Evans <je@fb.com> |
Remove the "opt.valgrind" mallctl. Remove the "opt.valgrind" mallctl because it is unnecessary -- jemalloc automatically detects whether it is running inside valgrind.
/external/jemalloc/src/ctl.c
|
a2c719b37445ce9083b6fc5084436dc37ceb7f75 |
|
15-Apr-2014 |
Jason Evans <je@fb.com> |
Remove the "arenas.purge" mallctl. Remove the "arenas.purge" mallctl, which was obsoleted by the "arena.<i>.purge" mallctl in 3.1.0.
/external/jemalloc/src/ctl.c
|
4d434adb146375ad17f0d5e994ed5728d2942e3f |
|
15-Apr-2014 |
Jason Evans <je@fb.com> |
Make dss non-optional, and fix an "arena.<i>.dss" mallctl bug. 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.
/external/jemalloc/src/ctl.c
|
d8a390020c4750a9c5f3d9780e21bfc2b0d64cdf |
|
20-Dec-2013 |
Jason Evans <je@fb.com> |
Fix a few mallctl() documentation errors. Normalize mallctl() order (code and documentation).
/external/jemalloc/src/ctl.c
|
f1c3da8b02489b7728d4275ac011336299eace62 |
|
21-Oct-2013 |
Jason Evans <je@fb.com> |
Consistently use malloc_mutex_prefork(). Consistently use malloc_mutex_prefork() instead of malloc_mutex_lock() in all prefork functions.
/external/jemalloc/src/ctl.c
|
7b65180b32558fc4f2bc7b6ac5602f306ed3a014 |
|
20-Oct-2013 |
Jason Evans <jasone@canonware.com> |
Fix a race condition in the "arenas.extend" mallctl. Fix a race condition in the "arenas.extend" mallctl that could lead to internal data structure corruption. The race could be hit if one thread called the "arenas.extend" mallctl while another thread concurrently triggered initialization of one of the lazily created arenas.
/external/jemalloc/src/ctl.c
|
3ab682d341f033017d042e8498578c2332eacd69 |
|
20-Oct-2013 |
Jason Evans <jasone@canonware.com> |
Silence an unused variable warning. Reported by Ricardo Nabinger Sanchez.
/external/jemalloc/src/ctl.c
|
6eb84fbe315add1e1d4f8deedc25d260fff3ae97 |
|
30-Nov-2012 |
Jason Evans <jasone@canonware.com> |
Fix "arenas.extend" mallctl to return the number of arenas. Reported by Mike Hommey.
/external/jemalloc/src/ctl.c
|
34457f51448e81f32a1bff16bbf600b79dd9ec5a |
|
04-Nov-2012 |
Jason Evans <je@fb.com> |
Fix deadlock in the arenas.purge mallctl. Fix deadlock in the arenas.purge mallctl due to recursive mutex acquisition.
/external/jemalloc/src/ctl.c
|
a5c80f893edbf44d70336e8a3d558bac9d057929 |
|
15-Oct-2012 |
Jason Evans <je@fb.com> |
Add ctl_mutex proection to arena_i_dss_ctl(). Add ctl_mutex proection to arena_i_dss_ctl(), since ctl_stats.narenas is accessed.
/external/jemalloc/src/ctl.c
|
609ae595f0358157b19311b0f9f9591db7cee705 |
|
11-Oct-2012 |
Jason Evans <je@fb.com> |
Add arena-specific and selective dss allocation. Add the "arenas.extend" mallctl, so that it is possible to create new arenas that are outside the set that jemalloc automatically multiplexes threads onto. Add the ALLOCM_ARENA() flag for {,r,d}allocm(), so that it is possible to explicitly allocate from a particular arena. Add the "opt.dss" mallctl, which controls the default precedence of dss allocation relative to mmap allocation. Add the "arena.<i>.dss" mallctl, which makes it possible to set the default dss precedence on a per arena or global basis. Add the "arena.<i>.purge" mallctl, which obsoletes "arenas.purge". Add the "stats.arenas.<i>.dss" mallctl.
/external/jemalloc/src/ctl.c
|
20f1fc95adb35ea63dc61f47f2b0ffbd37d39f32 |
|
09-Oct-2012 |
Jason Evans <je@fb.com> |
Fix fork(2)-related deadlocks. Add a library constructor for jemalloc that initializes the allocator. This fixes a race that could occur if threads were created by the main thread prior to any memory allocation, followed by fork(2), and then memory allocation in the child process. Fix the prefork/postfork functions to acquire/release the ctl, prof, and rtree mutexes. This fixes various fork() child process deadlocks, but one possible deadlock remains (intentionally) unaddressed: prof backtracing can acquire runtime library mutexes, so deadlock is still possible if heap profiling is enabled during fork(). This deadlock is known to be a real issue in at least the case of libgcc-based backtracing. Reported by tfengjun.
/external/jemalloc/src/ctl.c
|
f4c3f8545beed9f7e606cef7b1d06fae3f630269 |
|
09-Oct-2012 |
Jason Evans <jasone@canonware.com> |
Fix error return value in thread_tcache_enabled_ctl(). Reported by Corey Richardson.
/external/jemalloc/src/ctl.c
|
2e671ffbadc02fc7de8cbafdd1031e3b0ad73c5b |
|
10-May-2012 |
Jason Evans <je@fb.com> |
Add the --enable-mremap option. Add the --enable-mremap option, and disable the use of mremap(2) by default, for the same reason that freeing chunks via munmap(2) is disabled by default on Linux: semi-permanent VM map fragmentation.
/external/jemalloc/src/ctl.c
|
af04b744bda40842631d80ad04e1510308b13e54 |
|
30-Apr-2012 |
Mike Hommey <mh@glandium.org> |
Remove the VOID macro Windows headers define a VOID macro.
/external/jemalloc/src/ctl.c
|
8b49971d0ce0819af78aa2a278c26ecb298ee134 |
|
24-Apr-2012 |
Mike Hommey <mh@glandium.org> |
Avoid variable length arrays and remove declarations within code MSVC doesn't support C99, and building as C++ to be able to use them is dangerous, as C++ and C99 are incompatible. Introduce a VARIABLE_ARRAY macro that either uses VLA when supported, or alloca() otherwise. Note that using alloca() inside loops doesn't quite work like VLAs, thus the use of VARIABLE_ARRAY there is discouraged. It might be worth investigating ways to check whether VARIABLE_ARRAY is used in such context at runtime in debug builds and bail out if that happens.
/external/jemalloc/src/ctl.c
|
6b9ed67b4b9d65731d1eeb7937989ef96288b706 |
|
25-Apr-2012 |
Jason Evans <je@fb.com> |
Fix the "epoch" mallctl. Fix the "epoch" mallctl to update cached stats even if the passed in epoch is 0.
/external/jemalloc/src/ctl.c
|
87667a86a072ed5127343cc7698c3144cac37e05 |
|
24-Apr-2012 |
Jason Evans <je@fb.com> |
Fix two CHILD() macro calls in the ctl tree.
/external/jemalloc/src/ctl.c
|
65f343a632aa1f6bd9b8a65761706391469d2620 |
|
24-Apr-2012 |
Jason Evans <je@fb.com> |
Fix ctl regression. Fix ctl to correctly compute the number of children at each level of the ctl tree.
/external/jemalloc/src/ctl.c
|
461ad5c87ae5f89cd086e47b31372e9123dcfcdf |
|
20-Apr-2012 |
Mike Hommey <mh@glandium.org> |
Avoid using a union for ctl_node_s MSVC doesn't support C99, and as such doesn't support designated initialization of structs and unions. As there is never a mix of indexed and named nodes, it is pretty straightforward to use a different type for each.
/external/jemalloc/src/ctl.c
|
0b25fe79aaf8840a5acda7e3160a053d42349872 |
|
18-Apr-2012 |
Jason Evans <je@fb.com> |
Update prof defaults to match common usage. Change the "opt.lg_prof_sample" default from 0 to 19 (1 B to 512 KiB). Change the "opt.prof_accum" default from true to false. Add the "opt.prof_final" mallctl, so that "opt.prof_prefix" need not be abused to disable final profile dumping.
/external/jemalloc/src/ctl.c
|
59ae2766af88bad07ac721c4ee427b171e897bcb |
|
17-Apr-2012 |
Jason Evans <je@fb.com> |
Add the --disable-munmap option. Add the --disable-munmap option, remove the configure test that attempted to detect the VM allocation quirk known to exist on Linux x86[_64], and make --disable-munmap implicit on Linux.
/external/jemalloc/src/ctl.c
|
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/src/ctl.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/ctl.c
|
b147611b5253921a873191bb0589d3b18f613946 |
|
05-Apr-2012 |
Jason Evans <jasone@canonware.com> |
Add utrace(2)-based tracing (--enable-utrace).
/external/jemalloc/src/ctl.c
|
f3ca7c8386f6a21347aed68053117c2c59939551 |
|
05-Apr-2012 |
Jason Evans <jasone@canonware.com> |
Add missing "opt.lg_tcache_max" mallctl implementation.
/external/jemalloc/src/ctl.c
|
01b3fe55ff3ac8e4aa689f09fcb0729da8037638 |
|
03-Apr-2012 |
Jason Evans <jasone@canonware.com> |
Add a0malloc(), a0calloc(), and a0free(). Add a0malloc(), a0calloc(), and a0free(), which are used by FreeBSD's libc to allocate/deallocate TLS in static binaries.
/external/jemalloc/src/ctl.c
|
ae4c7b4b4092906c641d69b4bf9fcb4a7d50790d |
|
02-Apr-2012 |
Jason Evans <jasone@canonware.com> |
Clean up *PAGE* macros. s/PAGE_SHIFT/LG_PAGE/g and s/PAGE_SIZE/PAGE/g. Remove remnants of the dynamic-page-shift code. Rename the "arenas.pagesize" mallctl to "arenas.page". Remove the "arenas.chunksize" mallctl, which is redundant with "opt.lg_chunk".
/external/jemalloc/src/ctl.c
|
d4be8b7b6ee2e21d079180455d4ccbf45cc1cee7 |
|
27-Mar-2012 |
Jason Evans <jasone@canonware.com> |
Add the "thread.tcache.enabled" mallctl.
/external/jemalloc/src/ctl.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/ctl.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/ctl.c
|
e7b8fa18d256e0bc18b61ee03b69af87fa3d7969 |
|
17-Mar-2012 |
Jason Evans <je@fb.com> |
Rename the "tcache.flush" mallctl to "thread.tcache.flush".
/external/jemalloc/src/ctl.c
|
4507f34628dfae26e6b0a6faa13e5f9a49600616 |
|
05-Mar-2012 |
Jason Evans <je@fb.com> |
Remove the lg_tcache_gc_sweep option. Remove the lg_tcache_gc_sweep option, because it is no longer very useful. Prior to the addition of dynamic adjustment of tcache fill count, it was possible for fill/flush overhead to be a problem, but this problem no longer occurs.
/external/jemalloc/src/ctl.c
|
c90ad71237c05473bcb968beddebb0a487c36e75 |
|
29-Feb-2012 |
Jason Evans <je@fb.com> |
Remove the sysv option.
/external/jemalloc/src/ctl.c
|
b172610317babc7f365584ddd7fdaf4eb8d9d04c |
|
29-Feb-2012 |
Jason Evans <je@fb.com> |
Simplify small size class infrastructure. Program-generate small size class tables for all valid combinations of LG_TINY_MIN, LG_QUANTUM, and PAGE_SHIFT. Use the appropriate table to generate all relevant data structures, and remove the distinction between tiny/quantum/cacheline/subpage bins. Remove --enable-dynamic-page-shift. This option didn't prove useful in practice, and it prevented optimizations. Add Tilera architecture support.
/external/jemalloc/src/ctl.c
|
5389146191b279ca3b90028357dd6ad66b283def |
|
14-Feb-2012 |
Jason Evans <je@fb.com> |
Remove the opt.lg_prof_bt_max option. Remove opt.lg_prof_bt_max, and hard code it to 7. The original intention of this option was to enable faster backtracing by limiting backtrace depth. However, this makes graphical pprof output very difficult to interpret. In practice, decreasing sampling frequency is a better mechanism for limiting profiling overhead.
/external/jemalloc/src/ctl.c
|
0b526ff94da7e59aa947a4d3529b2376794f8b01 |
|
14-Feb-2012 |
Jason Evans <je@fb.com> |
Remove the opt.lg_prof_tcmax option. Remove the opt.lg_prof_tcmax option and hard-code a cache size of 1024. This setting is something that users just shouldn't have to worry about. If lock contention actually ends up being a problem, the simple solution available to the user is to reduce sampling frequency.
/external/jemalloc/src/ctl.c
|
746868929afae3e346b47d0fa8a78d7fb131d5a4 |
|
14-Feb-2012 |
Jason Evans <je@fb.com> |
Remove highruns statistics.
/external/jemalloc/src/ctl.c
|
ef8897b4b938111fcc9b54725067f1dbb33a4c20 |
|
13-Feb-2012 |
Jason Evans <je@fb.com> |
Make 8-byte tiny size class non-optional. When tiny size class support was first added, it was intended to support truly tiny size classes (even 2 bytes). However, this wasn't very useful in practice, so the minimum tiny size class has been limited to sizeof(void *) for a long time now. This is too small to be standards compliant, but other commonly used malloc implementations do not even bother using a 16-byte quantum on systems with vector units (SSE2+, AltiVEC, etc.). As such, it is safe in practice to support an 8-byte tiny size class on 64-bit systems that support 16-byte types.
/external/jemalloc/src/ctl.c
|
4162627757889ea999264c2ddbc3c354768774e2 |
|
13-Feb-2012 |
Jason Evans <je@fb.com> |
Remove the swap feature. Remove the swap feature, which enabled per application swap files. In practice this feature has not proven itself useful to users.
/external/jemalloc/src/ctl.c
|
7372b15a31c63ac5cb9ed8aeabc2a0a3c005e8bf |
|
11-Feb-2012 |
Jason Evans <je@fb.com> |
Reduce cpp conditional logic complexity. Convert configuration-related cpp conditional logic to use static constant variables, e.g.: #ifdef JEMALLOC_DEBUG [...] #endif becomes: if (config_debug) { [...] } The advantage is clearer, more concise code. The main disadvantage is that data structures no longer have conditionally defined fields, so they pay the cost of all fields regardless of whether they are used. In practice, this is only a minor concern; config_stats will go away in an upcoming change, and config_prof is the only other major feature that depends on more than a few special-purpose fields.
/external/jemalloc/src/ctl.c
|
7427525c28d58c423a68930160e3b0fe577fe953 |
|
01-Apr-2011 |
Jason Evans <jasone@canonware.com> |
Move repo contents in jemalloc/ to top level.
/external/jemalloc/src/ctl.c
|