Daan Leijen
1909cfb346
refine mi_os_good_alloc_size and use it for huge pages (to ensure realloc is bounded as in #153
2019-09-10 13:26:51 -07:00
Daan Leijen
d278c26c0e
round huge page sizes into 12.5% increments (issue #153 )
2019-09-10 07:54:31 -07:00
daan
b104e434e4
fix volatile declaration on function
2019-09-09 08:07:35 -07:00
daan
23155c5d71
add recursion guard to deferred callback
2019-09-09 08:02:41 -07:00
daan
89858ab791
improve page_free_extend performance slightly; do not maintain expensive statistics in release mode
2019-09-06 16:48:48 -07:00
daan
7a91368108
pass page to block_zero_init and extend to block_size
2019-09-03 10:11:24 -07:00
daan
739d11313c
fix commit zero on windows
2019-09-02 14:53:22 -07:00
daan
d1bd1644d5
support zero-initialized memory detection
2019-09-02 13:16:52 -07:00
daan
64c1d6de86
fix mi_likely branch that was marked as unlikely
2019-08-29 07:50:35 -07:00
daan
a654732d99
merge from dev new atomics
2019-08-26 12:30:03 -07:00
daan
e8664001f7
Use standard _Atomic declarations and clean up atomic operations
2019-08-25 22:59:12 -07:00
daan
23c35f4aba
merge from dev
2019-08-25 13:07:07 -07:00
daan
038e8fd7d6
reduce retire size
2019-08-25 12:10:18 -07:00
daan
a431d80fc3
better object sizes for large objects
2019-08-25 10:20:03 -07:00
daan
23812cc0ac
do not keep a queue of huge pages and free them directly
2019-08-24 15:45:14 -07:00
daan
6c6fcad242
remove threadid from pages and keep page flags separate (cherry picked)
2019-08-23 21:42:24 -07:00
daan
acde83543f
remove threadid from pages and keep page flags separate
2019-08-23 14:08:00 -07:00
daan
b005f7cdbf
Merge branch 'dev' into dev-win
2019-08-20 09:46:05 -07:00
daan
ff88361329
lower block size for keeping retired pages
2019-08-20 09:45:50 -07:00
daan
05631ebfc4
Merge branch 'dev' into dev-win
2019-08-19 21:23:04 -07:00
daan
2066e2797d
don't allow allocations larger than PTRDIFF_MAX, issue #121
2019-08-19 19:29:27 -07:00
Daan Leijen
367fb046ec
Merge branch 'dev' into dev-win
2019-08-16 18:40:56 -07:00
Daan Leijen
069c26dbab
fix small object size check in mi_segment_page_alloc
2019-08-16 18:40:30 -07:00
daan
6d11e59250
fix to avoid potential linear behavior in page collect
2019-08-14 07:46:38 -07:00
daan
dbe010f2d4
add huge and giant stats; increase bins
2019-08-10 20:51:37 -07:00
daan
ed785253bf
restructure the page flags to use explicit masks
2019-08-10 17:48:00 -07:00
daan
6f3bc87dcd
merge from dev
2019-08-10 10:26:46 -07:00
daan
ccc78302bf
fix double assignment ( #125 , by @ebudai)
2019-08-10 09:53:00 -07:00
daan
442bad9190
add good-fit for allowing larger blocks in smaller segments
2019-08-09 11:18:38 -07:00
daan
5e56b40fe6
improve page flags handling
2019-08-08 17:18:49 -07:00
daan
6596e970a5
move in_full and has_aligned into page threadid for a single test in mi_free
2019-08-08 15:23:18 -07:00
daan
55778d2fe4
improved stats
2019-08-08 11:36:13 -07:00
daan
56778fe7d2
split normal and secure extend in a separate routine
2019-08-06 18:57:53 -07:00
daan
a022049705
remove old comment
2019-07-23 15:00:13 -07:00
daan
189ad0f81d
small optimizations, use bitwise aligne
2019-07-23 15:00:13 -07:00
Jim Huang
b5e26bedb1
Enforce strict include-what-you-use policy
...
The include-what-you-use (IWYU) policy is beneficial to faster
compilation and fewer recompilations. Many build tools, such as GNU make,
provide a mechanism for automatically figuring out what .h files a .cc
file depends on. These mechanisms typically look at #include lines. When
unnecessary #includes are listed, the build system is more likely to
recompile in cases where it is not necessary.
With the enforcement, header file <include/mimalloc.h> no longer
includes <stdlib.h>.
Reference:
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md
2019-07-23 14:59:57 -07:00
daan
8dc0b5345b
Merge branch 'dev' into dev-exp
2019-07-14 16:50:38 -07:00
daan
49ceb4d018
refactor delayed_free code
2019-07-14 16:48:53 -07:00
daan
5ad2effb39
use standard compliant compilation of the thread_free atomic field
2019-07-14 16:20:27 -07:00
daan
2cf419c9bc
Merge branch 'master' into dev
2019-07-14 14:50:39 -07:00
daan
adf65a100e
be less aggressive in page reuse to reduce memory footprint
2019-07-14 14:13:47 -07:00
linkwk7
d4eabf33b6
Fix typo in comments
2019-07-12 22:05:07 +08:00
daan
9e9208eae8
Merge branch 'dev' into dev-win
2019-07-11 15:22:09 -07:00
daan
1fdb4b288f
more eager handling of non-local frees
2019-07-11 15:21:57 -07:00
daan
1377b26b0a
Merge branch 'dev' into dev-win
2019-07-11 13:31:02 -07:00
daan
72a39c0bb1
initial fix for delayed freeing of huge pages transferred between threads
2019-07-11 13:30:40 -07:00
daan
0314373d93
add reset_decommit, reset_discard options; maintain more statistics
2019-07-09 20:24:00 -07:00
daan
7e743dfb58
fix C++ compilation warnings with VisualStudio 2017
2019-07-07 18:52:12 -07:00
daan
c3528203b5
fix compilation with C++, fix overrides in C++ to adhere to the spec (issue #26 )
2019-07-07 18:11:21 -07:00
daan
158705815e
fix aligned_ensured bug, trie inc bug, stats in the OS module
2019-07-03 00:16:27 -07:00