summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix ctl regression.Jason Evans2012-04-242-30/+32
| | | | | Fix ctl to correctly compute the number of children at each level of the ctl tree.
* Don't link tests with superfluous libraries.Jason Evans2012-04-241-1/+1
| | | | | Don't link tests with libraries that only libjemalloc needs to be linked to.
* Silence compiler warnings.Jason Evans2012-04-231-3/+3
|
* Force use of TLS if heap profiling is enabled.Jason Evans2012-04-231-0/+4
|
* Clean up documentation and formatting.Jason Evans2012-04-234-15/+11
|
* Fix jemalloc.sh code generation.Jason Evans2012-04-232-1/+5
| | | | | Fix jemalloc.sh code generation by adding @sorev@ and using it instead of @SOREV@ (which contains Makefile-specific variables).
* Avoid using a union for ctl_node_sMike Hommey2012-04-232-81/+114
| | | | | | | 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.
* Document MinGW support.Jason Evans2012-04-222-6/+7
|
* Fix heap profiling bugs.Jason Evans2012-04-224-87/+129
| | | | | | | | | | | Fix a potential deadlock that could occur during interval- and growth-triggered heap profile dumps. Fix an off-by-one heap profile statistics bug that could be observed in interval- and growth-triggered heap profiles. Fix heap profile dump filename sequence numbers (regression during conversion to malloc_snprintf()).
* Remove unused #includesMike Hommey2012-04-221-2/+0
|
* Remove #includes in testsMike Hommey2012-04-229-55/+0
| | | | | | | Since we're now including jemalloc_internal.h, all the required headers are already pulled. This will avoid having to fiddle with headers that can or can't be used with MSVC. Also, now that we use malloc_printf, we can use util.h's definition of assert instead of assert.h's.
* Fix intmax_t configure error messageMike Hommey2012-04-221-1/+1
|
* Remove leftovers from the vsnprintf check in malloc_vsnprintfMike Hommey2012-04-221-4/+0
| | | | | Commit 4eeb52f removed vsnprintf validation, but left a now unused va_copy. It so happens that MSVC doesn't support va_copy.
* Add support for MingwMike Hommey2012-04-2212-71/+357
|
* Remove mmap_unaligned.Jason Evans2012-04-226-102/+30
| | | | | | | | | | | | | Remove mmap_unaligned, which was used to heuristically decide whether to optimistically call mmap() in such a way that could reduce the total number of system calls. If I remember correctly, the intention of mmap_unaligned was to avoid always executing the slow path in the presence of ASLR. However, that reasoning seems to have been based on a flawed understanding of how ASLR actually works. Although ASLR apparently causes mmap() to ignore address requests, it does not cause total placement randomness, so there is a reasonable expectation that iterative mmap() calls will start returning chunk-aligned mappings once the first chunk has been properly aligned.
* Fix chunk allocation/deallocation bugs.Jason Evans2012-04-214-7/+26
| | | | | | | | | | | | 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-216-15/+20
| | | | | | | | | 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*().
* Put CONF_HANDLE_*() keys in quotes.Jason Evans2012-04-211-28/+29
| | | | | Put CONF_HANDLE_*() keys in quotes, so that they aren't mangled when --with-private-namespace is used.
* Fix isthreaded-related build breakage.Jason Evans2012-04-201-0/+1
|
* Add missing private namespace mangling.Jason Evans2012-04-202-0/+47
|
* Don't mangle pthread_create().Jason Evans2012-04-201-1/+0
| | | | Don't mangle pthread_create(); it's an exported symbol when defined.
* Make arena_salloc() an inline function.Jason Evans2012-04-205-50/+56
|
* Remove extra argument for malloc_tsd_cleanup_registerMike Hommey2012-04-192-14/+8
| | | | | Bookkeeping an extra argument that actually only stores a function pointer for a function we already have is not very useful.
* Remove initialization of the non-TLS tsd wrapper from static memoryMike Hommey2012-04-191-12/+3
| | | | | | Using static memory when malloc_tsd_malloc fails means all threads share the same wrapper and thus the same wrapped value. This defeats the purpose of TSD.
* Initialize all members of non-TLS tsd wrapper when creating itMike Hommey2012-04-191-0/+1
| | | | | | Not setting the initialized member leads to randomly calling the cleanup function in cases it shouldn't be called (and isn't called in other implementations).
* Make special FreeBSD function overrides visible.Jason Evans2012-04-193-0/+6
| | | | | | Make special FreeBSD libc/libthr function overrides for _malloc_prefork(), _malloc_postfork(), and _malloc_thread_cleanup() visible.
* Fix malloc_vsnprintf handling of %o, %u and %xMike Hommey2012-04-191-4/+16
| | | | | | These flags take unsigned values, but they were fed with signed values taken with va_arg, and that led to sign extension in cases where the corresponding value has the most significant bit set.
* Add a pages_purge function to wrap madvise(JEMALLOC_MADV_PURGE) callsMike Hommey2012-04-196-10/+20
| | | | | This will be used to implement the feature on mingw, which doesn't have madvise.
* 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
|