Commit Graph

33 Commits

Author SHA1 Message Date
Jason Evans
4d5c09905e Print prof-libgcc configure setting. 2010-10-02 21:35:27 -07:00
Jason Evans
355b438c85 Fix compiler warnings.
Add --enable-cc-silence, which can be used to silence harmless warnings.

Fix an aliasing bug in ckh_pointer_hash().
2010-09-20 19:20:48 -07:00
Jason Evans
6a0d2918ce Add memalign() and valloc() overrides.
If memalign() and/or valloc() are present on the system, override them
in order to avoid mixed allocator usage.
2010-09-20 16:52:41 -07:00
Jason Evans
79d660d35d Store full git GID in VERSION. 2010-09-17 17:38:24 -07:00
Jason Evans
2dbecf1f62 Port to Mac OS X.
Add Mac OS X support, based in large part on the OS X support in
Mozilla's version of jemalloc.
2010-09-11 18:20:16 -07:00
Jason Evans
b267d0f86a Add the thread.arena mallctl.
Make it possible for each thread to manage which arena it is associated
with.

Implement the 'tests' and 'check' build targets.
2010-08-13 17:36:00 -07:00
Jason Evans
3395860921 Don't build with -march=native.
Don't build with -march=native by default, because the generated code
may perform especially poorly on ABI-compatible, but internally
different, systems.
2010-04-07 23:41:00 -07:00
Jason Evans
0656ec0eb4 Fix build system problems.
Split library build rules up so that parallel building works.

Fix autoconf-related dependencies.

Remove obsolete JEMALLOC_VERSION definition.
2010-04-07 23:37:35 -07:00
Jason Evans
cfeccd34a3 Fix various config/build issues.
Don't look for a shared libunwind if --with-static-libunwind is
specified.

Set SONAME when linking the shared libjemalloc.

Add DESTDIR support.

Add install_{include,lib/man} build targets.

Clean up compiler flag configuration.
2010-03-03 16:38:07 -08:00
Jason Evans
ca6bd4f1c8 Add the --with-static-libunwind configure option. 2010-03-02 14:12:58 -08:00
Jason Evans
a40bc7afe8 Add release versioning support.
Base version string on 'git describe --long', and provide cpp
macros in jemalloc.h.

Add the version mallctl.
2010-03-02 13:01:16 -08:00
Jason Evans
b9477e782b Implement sampling for heap profiling. 2010-03-01 20:15:26 -08:00
Jason Evans
376b1529a3 Restructure source tree. 2010-02-11 14:45:59 -08:00
Jason Evans
fe5faa2cc5 Remove tracing (--enable-trace).
Remove all functionality related to tracing.  This functionality was
useful for understanding memory fragmentation during early algorithmic
design of jemalloc, but it had little utility for non-trivial
applications, due to the sheer volume of data written to disk.
2010-02-11 13:38:12 -08:00
Jason Evans
b01a6c2057 Add JEMALLOC_PROF_PREFIX support.
If JEMALLOC_PROF_PREFIX is set in the environment, use it as the
filename prefix when dumping heap profiles, rather than "jeprof".
2010-02-11 10:25:36 -08:00
Jason Evans
b27805b363 Various heap profiling improvements.
Add the --disable-prof-libgcc configure option, and add backtracing
based on libgcc, which is used by default.

Fix a bug in hash().

Fix various configuration-dependent compilation errors.
2010-02-10 18:20:38 -08:00
Jason Evans
6109fe07a1 Implement allocation profiling and leack checking.
Add the --enable-prof and --enable-prof-libunwind configure options.

Add the B/b, F/f, I/i, L/l, and U/u JEMALLOC_OPTIONS.

Interval-based profile dump triggering is not yet implemented.

Add supporting generic code:
* Add memory barriers.
* Add prn (LCG PRNG).
* Add hash (Murmur hash function).
* Add ckh (cuckoo hash tables).
2010-02-10 10:37:57 -08:00
Jason Evans
4201af0542 Add the --enable-swap configure option.
Add malloc_swap_enable().

Add the O/o JEMALLOC_OPTIONS flags, which control memory overcommit.

Fix mapped memory stats reporting for arenas.
2010-01-24 02:53:40 -08:00
Jason Evans
78d815c9de Add the --disable-tls configure option. 2010-01-17 14:06:20 -08:00
Jason Evans
b0fd5016db Add the --with-install-suffix configure option.
Fix some bugs in the Makefile's install target.
2010-01-17 01:49:20 -08:00
Jason Evans
e476f8a161 Refactor jemalloc.c into multiple source files.
Fix a stats bug in large object curruns accounting.

Replace tcache_bin_fill() with arena_tcache_fill(), and fix a bug in an OOM
error path.

Fix API name mangling to coexist with __attribute__((malloc)).
2010-01-16 09:53:50 -08:00
Jason Evans
03c2237af3 Make malloc_stats_print() a public symbol, and make it repeatedly callable.
Incrementally merge tcache stats, so that malloc_stats_print() always reports
at least most events that have occurred thus far.
2010-01-03 12:10:42 -08:00
Jason Evans
9ad48230ed Simplify JEMALLOC_ATTR_* macros to become JEMALLOC_ATTR().
Use JEMALLOC_ATTR(tls_model("initial-exec)) instead of -ftls-model=initial-exec
so that libjemalloc_pic.a can be directly linked into another library without
needing linker options changes.

Add attributes to malloc, calloc, and posix_memalign, for compatibility with
glibc's declarations.

Add function prototypes for the standard malloc(3) API.
2010-01-03 11:59:20 -08:00
Jason Evans
94ad2b57c3 Use "lg" prefix rather than "2pow" suffix to indicate base 2 logarithms.
Remove the default definition for SIZEOF_INT_2POW.
2009-12-29 00:09:15 -08:00
Jason Evans
84cbbcb90a Convert thread-specific caching from magazines, and implement incremental GC.
Add the 'G'/'g' and 'H'/'h' MALLOC_OPTIONS flags.

Add the malloc_tcache_flush() function.

Disable thread-specific caching until the application goes multi-threaded.
2009-12-29 00:09:15 -08:00
Jason Evans
3ee7a5c5b0 Remove the dynamic rebalancing code, since magazines reduce its utility. 2009-12-29 00:09:15 -08:00
Jason Evans
569432cffd Implement thread-aware allocation event tracing. 2009-12-29 00:09:15 -08:00
Jason Evans
90895cf859 Add --with-jemalloc-prefix, which supports API mangling.
Rename jemalloc_options-->malloc_options and jemalloc_message-->malloc_message.
2009-12-29 00:09:15 -08:00
Jason Evans
a162402282 Fix configure docs (--enable-lazy-lock --> --disable-lazy-lock).
Fix some style nits.

Ignore the jemalloc/bin directory.
2009-11-09 14:58:12 -08:00
Jason Evans
662a017c1d Integrate mtrgraph and mtrplay. 2009-07-01 19:24:31 -07:00
Jason Evans
f3340ca8d5 Add configure tests for CFLAGS settings.
Add configure test for __asm__ syntax.

Add configure test for __attribute__ syntax.
2009-06-30 16:17:05 -07:00
Jason Evans
cc00a15770 Clean up the manpage and conditionalize various portions according to how
jemalloc is configured.

Modify arena_malloc() API to avoid unnecessary choose_arena() calls.  Remove
unnecessary code from choose_arena().

Enable lazy-lock by default, now that choose_arena() is both faster and out of
the critical path.

Implement objdir support in the build system.
2009-06-25 18:06:48 -07:00
Jason Evans
b7924f50c0 Implement configuration system.
Implement minimal Makefile.

Make compile-time-optional jemalloc features controllable via configure
options (debug, stats, tiny, mag, balance, dss).

Conditionally exclude most of the opt_* run-time options, based on configure
options (fill, xmalloc, sysv).

Implement optional --enable-dynamic-page-shift.

Implement optional --enable-lazy-lock.

Re-order malloc_init_hard() and use the malloc_initializer variable to support
recursive allocation in malloc_ncpus().

Add mag_rack_tsd in order to receive notifications of thread termination.

Add jemalloc.h.
2009-06-23 19:01:18 -07:00