History log of /external/jemalloc/include/jemalloc/internal/rtree.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
895b670409dd89a13e64f19f94df355cd661fbf0 16-May-2015 Jason Evans <jasone@canonware.com> Avoid atomic operations for dependent rtree reads.

Bug: 21326736
(cherry picked from commit 831d585c1dad2e6e39804db2a223064d295cb4fe)

Change-Id: I75b5ab51aed356cfb4bff136f38f7188716717cc
/external/jemalloc/include/jemalloc/internal/rtree.h
54836b43a3f1ea31b33e529a1b7f450af375576a 08-May-2015 Jason Evans <jasone@canonware.com> Fix type punning in calls to atomic operation functions.

Bug: 21326736
(cherry picked from commit 19c98d82cb92516f9ec811fe413dbdf3f32f3caf)

Change-Id: I6ad3b73e8b977d231d5a51c824d6410e0804231c
/external/jemalloc/include/jemalloc/internal/rtree.h
83e5767ee9a8c68150cca06ae0d27a13ba4fcaf8 22-Apr-2015 Christopher Ferris <cferris@google.com> Revert "Revert "Merge remote-tracking branch 'aosp/upstream-dev' into merge""

This reverts commit 75929a97332565c3b987986f35652b6d5d275d3c.

The original failure this was reverted for seems to have been a bug somewhere else.

Change-Id: Ib29ba03b1b967f940dc19eceac2aa1d2923be1eb
/external/jemalloc/include/jemalloc/internal/rtree.h
75929a97332565c3b987986f35652b6d5d275d3c 16-Apr-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Merge remote-tracking branch 'aosp/upstream-dev' into merge"

Revert due to random ART crashes seen.

This reverts commit 5b5d97b42e84c2ac417271c3fab6fc282496a335.

Change-Id: I62a784301fded7ee853b182d172be46bb32bded7
/external/jemalloc/include/jemalloc/internal/rtree.h
fbd8d773ad0230ffba4e2c296dac3edcac9ca27e 12-Mar-2015 Jason Evans <je@fb.com> Fix unsigned comparison underflow.

These bugs only affected tests and debug builds.
/external/jemalloc/include/jemalloc/internal/rtree.h
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/include/jemalloc/internal/rtree.h
8d0e04d42f4750970ac3052a6c76379b60aba5dc 31-Jan-2015 Jason Evans <jasone@canonware.com> Refactor rtree to be lock-free.

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).
/external/jemalloc/include/jemalloc/internal/rtree.h
b954bc5d3a65966df0ce7801cd6102542b5e894b 03-Jan-2014 Jason Evans <je@fb.com> Convert rtree from (void *) to (uint8_t) storage.

Reduce rtree memory usage by storing booleans (1 byte each) rather than
pointers. The rtree code is only used to record whether jemalloc manages
a chunk of memory, so there's no need to store pointers in the rtree.

Increase rtree node size to 64 KiB in order to reduce tree depth from 13
to 3 on 64-bit systems. The conversion to more compact leaf nodes was
enough by itself to make the rtree depth 1 on 32-bit systems; due to the
fact that root nodes are smaller than the specified node size if
possible, the node size change has no impact on 32-bit systems (assuming
default chunk size).
/external/jemalloc/include/jemalloc/internal/rtree.h
b980cc774a9ccb208a82f4e9ccdcc695d06a960a 03-Jan-2014 Jason Evans <je@fb.com> Add rtree unit tests.
/external/jemalloc/include/jemalloc/internal/rtree.h
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/include/jemalloc/internal/rtree.h
7427525c28d58c423a68930160e3b0fe577fe953 01-Apr-2011 Jason Evans <jasone@canonware.com> Move repo contents in jemalloc/ to top level.
/external/jemalloc/include/jemalloc/internal/rtree.h