12141150fdbda57651a53ae2fe0edaea4891d814 |
|
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
|
59113bcc94b9fc7549611afb99ca99cad1a7f196 |
|
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
|