Commit Graph

8 Commits

Author SHA1 Message Date
Jason Evans
13668262d1 Fix some comments and whitespace. 2010-01-31 03:57:29 -08:00
Jason Evans
a0bf242230 Fix bootstrapping crash.
If a custom small_size2bin table was required due to non-default size
class settings, memory allocation prior to initializing chunk parameters
would cause a crash due to division by 0.  The fix re-orders the various
*_boot() function calls.

Bootstrapping is simpler now than it was before the base allocator
started just using the chunk allocator directly.  This allows
arena_boot[01]() to be combined.

Add error detection for pthread_atfork() and atexit() function calls.
2010-01-29 14:30:41 -08:00
Jason Evans
3c2343518c Implement mallctl{nametomib,bymib}().
Replace chunk stats code that was missing locking; this fixes a race
condition that could corrupt chunk statistics.

Converting malloc_stats_print() to use mallctl*().

Add a missing semicolon in th DSS code.

Convert malloc_tcache_flush() to a mallctl.

Convert malloc_swap_enable() to a set of mallctl's.
2010-01-27 13:10:56 -08:00
Jason Evans
bc25a47ee0 Various minor cleanups.
Clean up whitespace.

Lock access of swap_avail when printing stats.

Use inttypes.h for portable printf() format specifiers, specifically for
uint64_t (PRIu64).

Change highchunks and curchunks stats from (unsigned long) to (size_t).
2010-01-24 16:41:01 -08:00
Jason Evans
ed1bf457fb Add the w4opaque argument to numerous functions.
Add the w4opaque argument malloc_message() and malloc_stats_print(), and
propagate the change through all the internal APIs as necessary.
2010-01-19 12:11:25 -08:00
Jason Evans
b34e8684ec Add merged arena stats printing.
Add the "m" and "a" opts flags for malloc_stats_print().
2010-01-17 17:35:19 -08:00
Jason Evans
00b5c93347 Add the write4 parameter to malloc_stats_print().
Add malloc_cprintf() and malloc_vcprintf().
2010-01-17 15:49:25 -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