| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Some versions of Android provide a pthreads library without providing
pthread_atfork(), so in practice a separate feature test is necessary
for the latter.
|
| |
|
|
|
|
|
|
|
|
|
| |
Add feature tests for the MADV_FREE and MADV_DONTNEED flags to
madvise(2), so that MADV_FREE is detected and used for Linux kernel
versions 4.5 and newer. Refactor pages_purge() so that on systems which
support both flags, MADV_FREE is preferred over MADV_DONTNEED.
This resolves #387.
|
| |
|
| |
|
| |
|
|
|
|
| |
This resolves #494.
|
|
|
|
|
|
| |
This reverts commit a2e601a2236315fb6f994ff364ea442ed0aed07b.
JE_RUNNABLE() causes general cross-compilation issues.
|
|
|
|
|
| |
This avoids warnings in some cases, and is otherwise generally good
hygiene.
|
| |
|
|
|
|
|
|
|
|
| |
Add extent serial numbers and use them where appropriate as a sort key
that is higher priority than address, so that the allocation policy
prefers older extents.
This resolves #147.
|
|
|
|
|
| |
This regression was caused by 498856f44a30b31fe713a18eb2fc7c6ecf3a9f63
(Move slabs out of chunks.).
|
|
|
|
| |
This resolves #494.
|
| |
|
|
|
|
|
|
|
| |
This is tailored to Android, i.e. more specific than the *-*-linux*
configuration.
This resolves #471.
|
| |
|
| |
|
| |
|
|
|
|
| |
This change conforms to naming conventions throughout the codebase.
|
|
|
|
|
|
| |
This reverts commit c2942e2c0e097e7c75a3addd0b9c87758f91692e.
This resolves #495.
|
|
|
|
| |
This resolves #495.
|
| |
|
| |
|
|
|
|
| |
This supersedes -std=gnu99, and enables C11 atomics.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Do not call s2u() during alloc_size computation, since any necessary
ceiling increase is taken care of later by extent_first_best_fit() -->
extent_size_quantize_ceil(), and the s2u() call may erroneously cause a
higher quantization result.
Remove an overly strict overflow check that was added in
4a7852137d8b6598fdb90ea8e1fd3bc8a8b94a3a (Fix extent_recycle()'s
cache-oblivious padding support.).
|
|
|
|
|
|
|
| |
Add padding *after* computing the size class, so that the optimal size
class isn't skipped during search for a usable extent. This regression
was caused by b46261d58b449cc4c099ed2384451a2499688f0e (Implement
cache-oblivious support for huge size classes.).
|
|
|
|
|
|
|
|
|
| |
Add an "over-size" extent heap in which to store extents which exceed
the maximum size class (plus cache-oblivious padding, if enabled).
Remove psz2ind_clamp() and use psz2ind() instead so that trying to
allocate the maximum size class can in principle succeed. In practice,
this allows assertions to hold so that OOM errors can be successfully
generated.
|
|
|
|
|
|
|
|
|
| |
Fix extent_alloc_cache[_locked]() to support decommitted allocation, and
use this ability in arena_stash_dirty(), so that decommitted extents are
not needlessly committed during purging. In practice this does not
happen on any currently supported systems, because both extent merging
and decommit must be implemented; all supported systems implement one
xor the other.
|
| |
|
| |
|
|
|
|
| |
Treat it exactly like Linux since they both use GNU libc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rtree_node_init spinlocks the node, allocates, and then sets the node.
This is under heavy contention at the top of the tree if many threads
start to allocate at the same time.
Instead, take a per-rtree sleeping mutex to reduce spinning. Tested
both pthreads and osx OSSpinLock, and both reduce spinning adequately
Previous benchmark time:
./ttest1 500 100
~15s
New benchmark time:
./ttest1 500 100
.57s
|
|
|
|
| |
This resolves #485.
|
| |
|
| |
|
|
|
|
|
| |
OS X 10.12 deprecated OSSpinLock; os_unfair_lock is the recommended
replacement.
|
|
|
|
|
|
|
|
|
| |
Fix zone_force_unlock() to reinitialize, rather than unlocking mutexes,
since OS X 10.12 cannot tolerate a child unlocking mutexes that were
locked by its parent.
Refactor; this was a side effect of experimenting with zone
{de,re}registration during fork(2).
|
|
|
|
| |
_exit(2) is async-signal-safe, whereas exit(3) is not.
|
|
|
|
|
|
|
| |
Monitoring thread creation is unimplemented for Windows, which means
lazy-lock cannot function correctly.
This resolves #310.
|
|
|
|
|
|
| |
Fix and clean up various malloc_stats_print() issues caused by
0ba5b9b6189e16a983d8922d8c5cb6ab421906e8 (Add "J" (JSON) support to
malloc_stats_print().).
|
| |
|
|
|
|
| |
This resolves #474.
|
|
|
|
| |
This resolves #480.
|
| |
|
|
|
|
| |
This resolves #396.
|
|
|
|
|
|
|
|
| |
The raw clock variant is slow (even relative to plain CLOCK_MONOTONIC),
whereas the coarse clock variant is faster than CLOCK_MONOTONIC, but
still has resolution (~1ms) that is adequate for our purposes.
This resolves #479.
|
|
|
|
|
|
|
|
|
| |
Some applications wrap various system calls, and if they call the
allocator in their wrappers, unexpected reentry can result. This is not
a general solution (many other syscalls are spread throughout the code),
but this resolves a bootstrapping issue that is apparently common.
This resolves #443.
|
| |
|
|
|
|
|
|
|
| |
This works around malloc_conf not being properly initialized by at least
the cygwin toolchain. Prior build system changes to use
-Wl,--[no-]whole-archive may be necessary for malloc_conf resolution to
work properly as a non-weak symbol (not tested).
|