- May 12, 2012
-
-
Jason Evans authored
-
Jason Evans authored
Avoid mutex operations in _malloc_{pre,post}fork() unless jemalloc has been initialized. Reported by David Xu.
-
- May 11, 2012
-
-
Jason Evans authored
Refactor code such that arena_mapbits_{large,small}_set() always preserves the unzeroed flag, and manually manipulate the unzeroed flag in the one case where it actually gets reset (in arena_chunk_purge()). This fixes unzeroed preservation bugs in arena_run_split() and arena_ralloc_large_grow(). These bugs caused large calloc() to return non-zeroed memory under some circumstances.
-
Jason Evans authored
-
Jason Evans authored
Refactor duplicated arena_run_alloc() code into arena_run_alloc_helper().
-
- May 10, 2012
-
-
Jason Evans authored
-
Jason Evans authored
Generalize "stats.mapped" documentation to state that all inactive chunks are omitted, now that it is possible for mmap'ed chunks to be omitted in addition to DSS chunks.
-
Mike Hommey authored
da99e311 removed attributes on je_memalign and je_valloc, while they didn't have a definition in the jemalloc.h header, thus making them non-exported. Export them again, by defining them in the jemalloc.h header.
-
Mike Hommey authored
It doesn't allow the je_malloc_message and je_malloc_conf symbols to be overridden when linking statically.
-
Jason Evans authored
Add the --enable-mremap option, and disable the use of mremap(2) by default, for the same reason that freeing chunks via munmap(2) is disabled by default on Linux: semi-permanent VM map fragmentation.
-
- May 09, 2012
-
-
Jason Evans authored
Fix chunk_recycle() to correctly compute trailsize and re-insert trailing chunks. This fixes a major virtual memory leak. Simplify chunk_record() to avoid dropping/re-acquiring chunks_mtx.
-
Jason Evans authored
Simplify chunk_alloc_mmap() to no longer attempt map extension. The extra complexity isn't warranted, because although in the success case it saves one system call as compared to immediately falling back to chunk_alloc_mmap_slow(), it also makes the failure case even more expensive. This simplification removes two bugs: - For Windows platforms, pages_unmap() wasn't being called for unaligned mappings prior to falling back to chunk_alloc_mmap_slow(). This caused permanent virtual memory leaks. - For non-Windows platforms, alignment greater than chunksize caused pages_map() to be called with size 0 when attempting map extension. This always resulted in an mmap() error, and subsequent fallback to chunk_alloc_mmap_slow().
-
- May 03, 2012
-
-
Jason Evans authored
Fix a base allocator deadlock due to chunk_recycle() calling back into the base allocator.
-
Mike Hommey authored
In the alloca() case, this fails to be the right size.
-
Mike Hommey authored
We don't use MSVC's printf, but ours, and it doesn't support the I32 and I64 prefixes.
-
Mike Hommey authored
-
Mike Hommey authored
If an application wants to override je_malloc_message, it is better to define the symbol locally than to change its value in main(), which might be too late for various reasons. Due to je_malloc_message being initialized in util.c, statically linking jemalloc with an application defining je_malloc_message fails due to "multiple definition of" the symbol. Defining it without a value (like je_malloc_conf) makes it more easily overridable.
-
Jason Evans authored
Further optimize arena_salloc() to only look at the binind chunk map bits in the common case. Add more sanity checks to arena_salloc() that detect chunk map inconsistencies for large allocations (whether due to allocator bugs or application bugs).
-
- May 02, 2012
-
-
Mike Hommey authored
VALGRIND_RESIZEINPLACE_BLOCK was added in valgrind 3.7. Unfortunately, the __VALGRIND_MINOR__ macro still says 6 in 3.7 :(
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
Make malloc_write() non-inline, in order to resolve its dependency on je_malloc_write().
-
Jason Evans authored
Make CACHELINE a raw constant in order to work around a __declspec(align()) limitation. Submitted by Mike Hommey.
-
Jason Evans authored
Embed the bin index for small page runs into the chunk page map, in order to omit [...] in the following dependent load sequence: ptr-->mapelm-->[run-->bin-->]bin_info Move various non-critcal code out of the inlined function chain into helper functions (tcache_event_hard(), arena_dalloc_small(), and locking).
-
- May 01, 2012
-
-
Mike Hommey authored
Tested with MSVC 8 32 and 64 bits.
-
-
Mike Hommey authored
Theses newly added macros will be used to implement the equivalent under MSVC. Also, move the definitions to headers, where they make more sense, and for some, are even more useful there (e.g. malloc).
-
Mike Hommey authored
- Use the extensions autoconf finds for object and executable files. - Remove the sorev variable, and replace SOREV definition with sorev's. - Default to je_ prefix on win32.
-
Mike Hommey authored
Using errno on win32 doesn't quite work, because the value set in a shared library can't be read from e.g. an executable calling the function setting errno. At the same time, since buferror always uses errno/GetLastError, don't pass it.
-
Mike Hommey authored
Windows headers define a VOID macro.
-
- Apr 29, 2012
-
-
Mike Hommey authored
MSVC doesn't support C99, and building as C++ to be able to use them is dangerous, as C++ and C99 are incompatible. Introduce a VARIABLE_ARRAY macro that either uses VLA when supported, or alloca() otherwise. Note that using alloca() inside loops doesn't quite work like VLAs, thus the use of VARIABLE_ARRAY there is discouraged. It might be worth investigating ways to check whether VARIABLE_ARRAY is used in such context at runtime in debug builds and bail out if that happens.
-
Jason Evans authored
-
Jason Evans authored
Handle prof_tdata resurrection during thread shutdown, similarly to how tcache and quarantine handle resurrection.
-
- Apr 28, 2012
-
-
Jason Evans authored
Don't set prof_tdata during thread cleanup, because doing so will cause the cleanup function to be called again, the second time with a NULL argument.
-
- Apr 26, 2012
-
-
Jason Evans authored
Reported by Daichi GOTO.
-
- Apr 25, 2012
-
-
Jason Evans authored
Fix a PROF_ALLOC_PREP() error path to initialize the return value to NULL.
-
Jason Evans authored
Fix the "epoch" mallctl to update cached stats even if the passed in epoch is 0.
-
- Apr 24, 2012
-
-
Jason Evans authored
-
Jason Evans authored
-
Jason Evans authored
-