summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add an abstraction layer for threading in testsMike Hommey2012-04-184-55/+45
| |
| * Refactor object and library build, and only build PIC libraries when ↵Mike Hommey2012-04-182-35/+40
| | | | | | | | PIC_CFLAGS is defined
| * Make versioned shared library suffix configurableMike Hommey2012-04-183-8/+18
| | | | | | | | | | | | | | | | This allows for different patterns for file names: - lib.so.version for e.g. Linux - lib.version.dylib for OSX (which is much more common than lib.dylib.version) - lib.dll for Windows (no version at all).
| * Clean up a few config-related conditionals/asserts.Jason Evans2012-04-182-6/+8
| | | | | | | | | | | | Clean up a few config-related conditionals to avoid unnecessary dependencies on prof symbols. Use cassert() rather than assert() everywhere that it's appropriate.
| * Update prof defaults to match common usage.Jason Evans2012-04-177-20/+41
| | | | | | | | | | | | | | | | | | 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.
| * Update pprof (from gperftools 2.0).Jason Evans2012-04-173-194/+650
| |
| * Add atomic(9) implementations of atomic operations.Jason Evans2012-04-174-6/+72
| | | | | | | | | | Add atomic(9) implementations of atomic operations. These are used on FreeBSD for non-x86 architectures.
| * Replace fprintf with malloc_printf in tests.Mike Hommey2012-04-1712-108/+108
| |
| * Limit the number of flags directly given to the linker, and refactor rpathMike Hommey2012-04-172-18/+10
| | | | | | | | This will make things easier for MSVC support.
| * Add variables for library prefix, and static library, object and executable ↵Mike Hommey2012-04-172-26/+40
| | | | | | | | | | | | suffixes This makes hacking on Makefile easier.
| * Use echo instead of cat in loops in size_classes.shMike Hommey2012-04-171-21/+11
| | | | | | | | | | This avoids fork/exec()ing in loops, as echo is a builtin, and makes size_classes.sh much faster (from > 10s to < 0.2s on mingw on my machine).
| * Use make variables instead of preprocessingMike Hommey2012-04-171-93/+109
| |
| * Use $(LIBS) instead of -lpthread when linking testsMike Hommey2012-04-171-2/+2
| | | | | | | | This will allow linking for win32 without pthreads more easily
| * Remove -dynamic CFLAG on OSXMike Hommey2012-04-171-3/+0
| | | | | | | | | | It is a linker flag, so it doesn't make sense in CFLAGS, and it's the default when invoking the linker for shared libraries.
| * Start preparing ChangeLog for 3.0.0 release.Jason Evans2012-04-171-0/+72
| | | | | | | | | | Start preparing ChangeLog for 3.0.0 release. Additional fixes and changes are yet to come, so this is not a complete ChangeLog.
| * Add the --disable-munmap option.Jason Evans2012-04-174-66/+39
| | | | | | | | | | | | 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.
| * Remove configure test cruft.Jason Evans2012-04-161-1/+0
| |
| * Add/remove missing/cruft entries to/from private_namespace.h.Jason Evans2012-04-141-13/+52
| |
| * Disable munmap() if it causes VM map holes.Jason Evans2012-04-1311-244/+277
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Always disable redzone by default.Jason Evans2012-04-132-6/+2
| | | | | | | | | | | | Always disable redzone by default, even when --enable-debug is specified. The memory overhead for redzones can be substantial, which makes this feature something that should only be opted into.
| * Re-silence -MM compiler invocations.Jason Evans2012-04-131-3/+3
| |
| * Use -MT options to build dependency filesMike Hommey2012-04-121-3/+3
| |
| * Remove bogus dependencyMike Hommey2012-04-121-3/+0
| | | | | | | | | | test/bitmap.c #includes src/bitmap.c, which is correctly detected by gcc -MM, but building test/bitmap.o doesn't require src/bitmap.o.
| * Call base_boot before chunk_boot0Mike Hommey2012-04-121-2/+2
| | | | | | | | | | Chunk_boot0 calls rtree_new, which calls base_alloc, which locks the base_mtx mutex. That mutex is initialized in base_boot.
| * Use a stub replacement and disable dss when sbrk is not supportedMike Hommey2012-04-123-0/+22
| |
| * Normalize aligned allocation algorithms.Jason Evans2012-04-128-155/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()).
| * Implement Valgrind support, redzones, and quarantine.Jason Evans2012-04-1120-170/+840
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Rename labels.Jason Evans2012-04-1011-129/+129
| | | | | | | | | | | | | | 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-109-138/+87
| |
| * Remove MAP_NORESERVE supportMike Hommey2012-04-102-28/+14
| | | | | | | | It was only used by the swap feature, and that is gone.
| * Ignore whitespaces when comparing test results with expected outputMike Hommey2012-04-101-1/+1
| | | | | | | | | | In mingw, the test result may contain CRLF while the .exp files don't, or the other way around.
| * Always initialize tcache data structures.Jason Evans2012-04-061-46/+38
| | | | | | | | | | | | | | Always initialize tcache data structures if the tcache configuration option is enabled, regardless of opt_tcache. This fixes "thread.tcache.enabled" mallctl manipulation in the case when opt_tcache is false.
| * Remove arena_malloc_prechosen().Jason Evans2012-04-062-15/+1
| | | | | | | | | | Remove arena_malloc_prechosen(), now that arena_malloc() can be invoked in a way that is semantically equivalent.
| * Add utrace(2)-based tracing (--enable-utrace).Jason Evans2012-04-059-1/+118
| |
| * Fix threaded initialization and enable it on Linux.Jason Evans2012-04-052-3/+6
| | | | | | | | Reported by Mike Hommey.
| * Add missing "opt.lg_tcache_max" mallctl implementation.Jason Evans2012-04-041-0/+3
| |
| * Add missing include for ffsl() test.Jason Evans2012-04-041-0/+1
| |
| * Revert "Use ffsl() in ALLOCM_ALIGN()."Jason Evans2012-04-041-1/+6
| | | | | | | | | | | | | | | | This reverts commit 722b370399fd6734de6781285ce9a0cffd547bdd. Unfortunately, glibc requires _GNU_SOURCE to be defined before including string.h, but there is no reliable way to get the prototype within jemalloc.h unless _GNU_SOURCE was already defined.
| * Add tls_model configuration.Jason Evans2012-04-043-4/+22
| | | | | | | | | | The tls_model attribute isn't supporte by clang (yet?), so add a configure test that defines JEMALLOC_TLS_MODEL appropriately.
| * Add a0malloc(), a0calloc(), and a0free().Jason Evans2012-04-046-29/+89
| | | | | | | | | | Add a0malloc(), a0calloc(), and a0free(), which are used by FreeBSD's libc to allocate/deallocate TLS in static binaries.
| * Postpone mutex initialization on FreeBSD.Jason Evans2012-04-043-13/+58
| | | | | | | | | | Postpone mutex initialization on FreeBSD until after base allocation is safe.
| * Remove obsolete "config.dynamic_page_shift" mallctl documentation.Jason Evans2012-04-031-10/+0
| |
| * Use $((...)) instead of expr.Jason Evans2012-04-031-15/+15
| | | | | | | | | | | | | | Use $((...)) for math in size_classes.h rather than expr, because it is much faster. This is not supported syntax in the classic Bourne shell, but all modern sh implementations support it, including bash, zsh, and ash.
| * Finish renaming "arenas.pagesize" to "arenas.page".Jason Evans2012-04-021-11/+10
| |
| * Clean up *PAGE* macros.Jason Evans2012-04-0213-213/+148
| | | | | | | | | | | | | | | | | | | | | | 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".
| * Revert "Avoid NULL check in free() and malloc_usable_size()."Jason Evans2012-04-025-37/+22
| | | | | | | | | | | | | | | | | | | | This reverts commit 96d4120ac08db3f2d566e8e5c3bc134a24aa0afc. ivsalloc() depends on chunks_rtree being initialized. This can be worked around via a NULL pointer check. However, thread_allocated_tsd_get() also depends on initialization having occurred, and there is no way to guard its call in free() that is cheaper than checking whether ptr is NULL.
| * Avoid NULL check in free() and malloc_usable_size().Jason Evans2012-04-025-22/+37
| | | | | | | | | | | | | | | | | | Generalize isalloc() to handle NULL pointers in such a way that the NULL checking overhead is only paid when introspecting huge allocations (or NULL). This allows free() and malloc_usable_size() to no longer check for NULL. Submitted by Igor Bukanov and Mike Hommey.
| * Move last bit of zone initialization in zone.c, and lazy-initializeMike Hommey2012-04-024-45/+1
| |
| * Use ffsl() in ALLOCM_ALIGN().Jason Evans2012-04-021-6/+1
| | | | | | | | | | | | Use ffsl() rather than ffs() plus bitshifting in ALLOCM_ALIGN(). The original rational for using ffs() was portability, but the bitmap code has since induced a hard dependency on ffsl().
| * Remove vsnprintf() and strtoumax() validation.Jason Evans2012-04-023-30/+1
| | | | | | | | | | | | | | | | | | | | Remove code that validates malloc_vsnprintf() and malloc_strtoumax() against their namesakes. The validation code has adequately served its usefulness at this point, and it isn't worth dealing with the different formatting for %p with glibc versus other implementations for NULL pointers ("(nil)" vs. "0x0"). Reported by Mike Hommey.