summaryrefslogtreecommitdiffstats
path: root/jemalloc/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix a "thread.arena" mallctl bug.Jason Evans2011-03-141-14/+24
| | | | Fix a variable reversal bug in mallctl("thread.arena", ...).
* Fix "thread.{de,}allocatedp" mallctl.Jason Evans2011-02-141-0/+37
| | | | | | | | | For the non-TLS case (as on OS X), if the "thread.{de,}allocatedp" mallctl was called before any allocation occurred for that thread, the TSD was still NULL, thus putting the application at risk of dereferencing NULL. Fix this by refactoring the initialization code, and making it part of the conditional logic for all per thread allocation counter accesses.
* Use mremap(2) for huge realloc().Jason Evans2010-12-012-0/+69
| | | | | | | | | | If mremap(2) is available and supports MREMAP_FIXED, use it for huge realloc(). Initialize rtree later during bootstrapping, so that --enable-debug --enable-dss works. Fix a minor swap_avail stats bug.
* Replace JEMALLOC_OPTIONS with MALLOC_CONF.Jason Evans2010-10-241-10/+10
| | | | | | | | | | | Replace the single-character run-time flags with key/value pairs, which can be set via the malloc_conf global, /etc/malloc.conf, and the MALLOC_CONF environment variable. Replace the JEMALLOC_PROF_PREFIX environment variable with the "opt.prof_prefix" option. Replace umax2s() with u2s().
* Add per thread allocation counters, and enhance heap sampling.Jason Evans2010-10-212-0/+107
| | | | | | | | | | | | | | | | | | | Add the "thread.allocated" and "thread.deallocated" mallctls, which can be used to query the total number of bytes ever allocated/deallocated by the calling thread. Add s2u() and sa2u(), which can be used to compute the usable size that will result from an allocation request of a particular size/alignment. Re-factor ipalloc() to use sa2u(). Enhance the heap profiler to trigger samples based on usable size, rather than request size. This has a subtle, but important, impact on the accuracy of heap sampling. For example, previous to this change, 16- and 17-byte objects were sampled at nearly the same rate, but 17-byte objects actually consume 32 bytes each. Therefore it was possible for the sample to be somewhat skewed compared to actual memory usage of the allocated objects.
* Fix tests build when --with-install-suffix is set.Jason Evans2010-10-075-4/+10
| | | | | | Add test/jemalloc_test.h.in, which is processed to include jemalloc/jemalloc@install_suffix@.h, so that test programs can include it without worrying about the install suffix.
* Fix compiler warnings.Jason Evans2010-09-211-2/+13
| | | | | | Add --enable-cc-silence, which can be used to silence harmless warnings. Fix an aliasing bug in ckh_pointer_hash().
* Add {,r,s,d}allocm().Jason Evans2010-09-175-3/+279
| | | | | | Add allocm(), rallocm(), sallocm(), and dallocm(), which are a functional superset of malloc(), calloc(), posix_memalign(), malloc_usable_size(), and free().
* Fix porting regressions.Jason Evans2010-09-122-13/+7
| | | | | Fix new build failures and test failures on Linux that were introduced by the port to OS X.
* Add posix_memalign test.Jason Evans2010-09-122-0/+153
|
* Port to Mac OS X.Jason Evans2010-09-121-4/+6
| | | | | Add Mac OS X support, based in large part on the OS X support in Mozilla's version of jemalloc.
* Add the thread.arena mallctl.Jason Evans2010-08-142-0/+71
Make it possible for each thread to manage which arena it is associated with. Implement the 'tests' and 'check' build targets.