- Dec 04, 2019
-
-
ALEIX ROCA NONELL authored
Remove default purge hooks. This prevents jemalloc from calling madvise to detach physical pages from virtual addresses.
-
- Aug 05, 2019
-
-
Qi Wang authored
- Aug 02, 2019
-
-
Qi Wang authored
-
- Jul 31, 2019
-
-
Yinan Zhang authored
The emitter APIs used were incorrect, a side effect of which was extra lines being printed.
-
- Jul 30, 2019
-
-
Yinan Zhang authored
g++ 5.5.0+ complained `parameter ‘expected’ set but not used [-Werror=unused-but-set-parameter]` (despite that `expected` is in fact used).
-
Qi Wang authored
W/o retain, split and merge are disallowed on Windows. Avoid doing first-fit which needs splitting almost always. Instead, try exact fit only and bail out early.
-
- Jul 29, 2019
-
-
Yinan Zhang authored
Refactored core profiling codebase into two logical parts: (a) `prof_data.c`: core internal data structure managing & dumping; (b) `prof.c`: mutexes & outward-facing APIs. Some internal functions had to be exposed out, but there are not that many of them if the modularization is (hopefully) clean enough.
-
Yinan Zhang authored
`prof.c` is growing too long, so trying to modularize it. There are a few internal functions that had to be exposed but I think it is a fair trade-off.
- Jul 26, 2019
- Jul 25, 2019
- Jul 24, 2019
-
-
Qi Wang authored
Stop scanning once reached the first max_active_fit size.
-
Qi Wang authored
The counter is 0 unless metadata allocation failed (indicates OOM), and is mainly for sanity checking.
-
Qi Wang authored
extent_register may only fail if the underlying extent and region got stolen / coalesced before we lock. Avoid doing extent_leak (which purges the region) since we don't really own the region.
-
Qi Wang authored
This can only happen on Windows and with opt.retain disabled (which isn't the default). The solution is suboptimal, however not a common case as retain is the long term plan for all platforms anyway.
-
Qi Wang authored
-
Qi Wang authored
The VirtualAlloc and VirtualFree APIs are different because MEM_DECOMMIT cannot be used across multiple VirtualAlloc regions. To properly support decommit, only allow merge / split within the same region -- this is done by tracking the "is_head" state of extents and not merging cross-region. Add a new state is_head (only relevant for retain && !maps_coalesce), which is true for the first extent in each VirtualAlloc region. Determine if two extents can be merged based on the head state, and use serial numbers for sanity checks.
-
- Jul 18, 2019
-
-
Qi Wang authored
Return a valid pointer instead of failed assertion.
-
- Jul 17, 2019
-
-
Yinan Zhang authored
`prof_accumbytes` was supposed to be replaced by `prof_accum` in https://github.com/jemalloc/jemalloc/pull/623.
-
Yinan Zhang authored
The original logic can be disastrous if `PROF_DUMP_BUFSIZE` is less than `slen` -- `prof_dump_buf_end + slen <= PROF_DUMP_BUFSIZE` would always be `false`, so `memcpy` would always try to copy `PROF_DUMP_BUFSIZE - prof_dump_buf_end` chars, which can be dangerous: in the last round of the `while` loop it would not only illegally read the memory beyond `s` (which might not always be disastrous), but it would also illegally overwrite the memory beyond `prof_dump_buf` (which can be pretty disastrous). `slen` probably has never gone beyond `PROF_DUMP_BUFSIZE` so we were just lucky.
-
- Jul 16, 2019
-
-
Yinan Zhang authored
`cbopaque` can now be overriden without overriding `write_cb` in the first place. (Otherwise there would be no need to have the `cbopaque` parameter in `malloc_message`.)
-
- Jul 15, 2019
-
-
Qi Wang authored
Enable-debug and 64-bit runs tend to be more relevant. Run them first.
-
- Jul 12, 2019
-
-
Yinan Zhang authored
-
- May 24, 2019
-
-
frederik-h authored
The file is included in the list of source files in Makefile.in, but it is missing from the project files. This causes the build to fail due to unresolved symbols.
-
- May 22, 2019
-
-
Qi Wang authored
Background threads may run for a long time, especially when the # of dirty pages is high. Avoid blocking stats calls because of this (which may cause latency spikes).
-
Qi Wang authored
The new experimental mallctl exposes the arena pactive counter to applications, which allows fast read w/o going through the mallctl / epoch steps. This is particularly useful when frequent balancing is required, e.g. when having multiple manual arenas, and threads are multiplexed to them based on usage.
-
Yinan Zhang authored
If the confirm_conf option is set, when the program starts, each of the four malloc_conf strings will be printed, and each option will be printed when being set.
-
- May 21, 2019
-
-
Yinan Zhang authored
Added tests for large size classes and expanded the tests to cover wider range of allocation sizes.
-
Vaibhav Jain authored
GCC-9.1 reports following error when trying to compile file src/malloc_io.c and with CFLAGS='-Werror' : src/malloc_io.c: In function ‘malloc_vsnprintf’: src/malloc_io.c:369:2: error: case label value exceeds maximum value for type [-Werror] 369 | case '?' | 0x80: \ | ^~~~ src/malloc_io.c:581:5: note: in expansion of macro ‘GET_ARG_NUMERIC’ 581 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~ ... <snip> cc1: all warnings being treated as errors make: *** [Makefile:388: src/malloc_io.sym.o] Error 1 The warning is reported as by default the type 'char' is 'signed char' and or-ing 0x80 will turn the case label char negative which will be beyond the printable ascii range (0 - 127). The patch fixes this by explicitly casting the 'len' variable as unsigned char' inside the 'switch' statement so that value of expression " '?' | 0x80 " falls within the legal values of the variable 'len'.
-
- May 15, 2019
-
-
Qi Wang authored
Small is added purely for convenience. Large flushes wasn't tracked before and can be useful in analysis. Large fill simply reports nmalloc, since there is no batch fill for large currently.
-
Yinan Zhang authored
rtree_szind_slab_read_fast() may have not initialized alloc_ctx.szind, unless after confirming the return is true.
-
- May 08, 2019
-
-
Yinan Zhang authored
Define more readable macros than yes and no.
-
Dave Watson authored
This option saves a few CPU cycles, but potentially adds a lot of fragmentation - so much so that there are workarounds like max_active. Instead, let's just drop it entirely. It only made a difference in one service I tested (.3% cpu regression), while many services saw a memory win (also small, less than 1% mem P99)
-
Dave Watson authored
The max_active_fit check is currently only on the best_fit path, add it to the first_fit path also.
-
- Apr 29, 2019
-
-
Doron Roberts-Kedes authored
When config_stats is enabled track the size of bin->slabs_nonfull in the new nonfull_slabs counter in bin_stats_t. This metric should be useful for establishing an upper ceiling on the savings possible by meshing.
-