summaryrefslogtreecommitdiffstats
path: root/src/chunk_dss.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix chunk allocation/deallocation bugs.Jason Evans2012-04-211-0/+4
| | | | | | | | | | | | Fix chunk_alloc_dss() to zero memory when requested. Fix chunk_dealloc() to avoid chunk_dealloc_mmap() for dss-allocated memory. Fix huge_palloc() to always junk fill when requested. Improve chunk_recycle() to report that memory is zeroed as a side effect of pages_purge().
* Fix a memory corruption bug in chunk_alloc_dss().Jason Evans2012-04-211-1/+0
| | | | | | | | | Fix a memory corruption bug in chunk_alloc_dss() that was due to claiming newly allocated memory is zeroed. Reverse order of preference between mmap() and sbrk() to prefer mmap(). Clean up management of 'zero' parameter in chunk_alloc*().
* Disable munmap() if it causes VM map holes.Jason Evans2012-04-131-224/+6
| | | | | | | | | | | Add a configure test to determine whether common mmap()/munmap() patterns cause VM map holes, and only use munmap() to discard unused chunks if the problem does not exist. Unify the chunk caching for mmap and dss. Fix options processing to limit lg_chunk to be large enough that redzones will always fit.
* Use a stub replacement and disable dss when sbrk is not supportedMike Hommey2012-04-121-0/+11
|
* Normalize aligned allocation algorithms.Jason Evans2012-04-121-37/+57
| | | | | | | | | | | | | | | Normalize arena_palloc(), chunk_alloc_mmap_slow(), and chunk_recycle_dss() to use the same algorithm for trimming over-allocation. Add the ALIGNMENT_ADDR2BASE(), ALIGNMENT_ADDR2OFFSET(), and ALIGNMENT_CEILING() macros, and use them where appropriate. Remove the run_size_p parameter from sa2u(). Fix a potential deadlock in chunk_recycle_dss() that was introduced by eae269036c9f702d9fa9be497a1a2aa1be13a29e (Add alignment support to chunk_alloc()).
* Rename labels.Jason Evans2012-04-101-2/+2
| | | | | | | 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.
* Add alignment support to chunk_alloc().Mike Hommey2012-04-101-28/+52
|
* Fix fork-related bugs.Jason Evans2012-03-131-4/+32
| | | | | | | | | Acquire/release arena bin locks as part of the prefork/postfork. This bug made deadlock in the child between fork and exec a possibility. Split jemalloc_postfork() into jemalloc_postfork_{parent,child}() so that the child can reinitialize mutexes rather than unlocking them. In practice, this bug tended not to cause problems.
* Reduce cpp conditional logic complexity.Jason Evans2012-02-111-2/+12
| | | | | | | | | | | | | | | | | | | | | | 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.
* Move repo contents in jemalloc/ to top level.Jason Evans2011-04-011-0/+284