Daan Leijen
b04206a9d3
add os cache to arena
2019-11-10 10:10:10 -08:00
Daan Leijen
fed0068dac
merge from dev-exp; bitmap based arena
2019-11-10 07:56:40 -08:00
daan
27f1a8b3d2
fix avg display; set secure default to 0`
2019-11-07 10:35:30 -08:00
daan
36090dee5c
Merge branch 'dev' into dev-exp
2019-11-07 10:34:06 -08:00
daan
31d11f64d5
fix secure free list extension where a non-empty initial free list was discarded
2019-11-07 10:33:45 -08:00
daan
378716c467
refactor and improve atomic bitmap usage
2019-11-07 10:26:52 -08:00
daan
e0b8ec7f54
merge with dev-exp
2019-11-02 11:56:19 -07:00
daan
fd9d8c85ae
change numa support on linux to use getcpu
2019-11-02 11:55:03 -07:00
daan
08c4726043
merge from dev-exp
2019-11-01 22:04:20 -07:00
daan
2c12d7f223
optimized numa calls; better Linux support
2019-11-01 22:01:52 -07:00
daan
f7d2c45af3
initial experiment with fixed memory arena and sliced segments
2019-10-31 00:40:41 -07:00
daan
c7ec30ae25
fix secure mode
2019-10-30 15:36:13 -07:00
daan
b73beede34
merge from dev
2019-10-30 15:19:34 -07:00
daan
b052d3b731
enable double free and heap corruption detection in debug mode
2019-10-28 15:54:33 -07:00
daan
081e2d1eb6
fix statistics display
2019-10-28 13:43:42 -07:00
daan
9d4f57abf3
merge from dev-win
2019-10-28 12:33:01 -07:00
daan
2affdbbd2e
stronger secure mode when defining MI_SECURE=4: checks for double free, corrupted free list, and invalid pointer frees. Performance is impacted but not too much -- more perf testing is needed
2019-10-18 18:11:04 -07:00
daan
4b15e2ed97
merge from dev
2019-10-17 18:24:35 -07:00
daan
5de851a84d
update page_flags to have more portable definition
2019-10-17 16:48:16 -07:00
daan
26c27fbf58
use uint8_t bit fields, and improve portability of page_flags type
2019-10-17 12:07:26 -07:00
Johannes Schindelin
559688ec64
Suppress warning about unnamed struct
...
This prevents MSVC complaining with
warning C4201: nonstandard extension used: nameless struct/union
The struct might seem unnecessary to the occasional reader (it did seem
so to this commit's author), but it is not! It is required to align the
fields to a boundary, which is verified by the test suite. Removing that
"unnecessary" `struct` results in this failure:
1: Test command: mimalloc-test-api
[...]
1: test: malloc-zero... mimalloc: assertion failed: at src/page.c:591, mi_page_init
1: assertion: "!mi_page_has_aligned(page)"
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-17 20:43:18 +02:00
Johannes Schindelin
e747a6f3a6
Use unsigned
for bit-field variables
...
It is actually non-standard to use `bool` with a bit-field quantifier,
and VS 2019 complains about this.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-17 20:43:18 +02:00
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
23155c5d71
add recursion guard to deferred callback
2019-09-09 08:02:41 -07:00
daan
d1bd1644d5
support zero-initialized memory detection
2019-09-02 13:16:52 -07:00
daan
db8d443ae6
track more precisely if memory is fixed or committed
2019-08-26 22:45:26 -07:00
daan
25dca38ef9
merge from dev-win
2019-08-26 12:47:16 -07:00
daan
e8664001f7
Use standard _Atomic declarations and clean up atomic operations
2019-08-25 22:59:12 -07:00
daan
a431d80fc3
better object sizes for large objects
2019-08-25 10:20:03 -07:00
daan
6f5492cef8
enable initial lazy commit and optional decommit to reduce commit charge with many threads
2019-08-24 15:00:55 -07:00
daan
612b2cc9b7
clean up segment slice handling
2019-08-24 12:20:32 -07:00
daan
cce38bc147
more conservative setting to avoid internal fragmentation
2019-08-24 07:32:23 -07:00
daan
082f012a91
merge from dev-win
2019-08-23 21:56:28 -07:00
daan
6c6fcad242
remove threadid from pages and keep page flags separate (cherry picked)
2019-08-23 21:42:24 -07:00
daan
15552eba79
ensure volatile declaration for abandoned_next field
2019-08-23 21:39:27 -07:00
daan
acde83543f
remove threadid from pages and keep page flags separate
2019-08-23 14:08:00 -07:00
daan
b511309709
ensure volatile declaration for abandoned_next field
2019-08-23 13:44:43 -07:00
daan
5c912f16d4
merge from remote
2019-08-21 11:35:09 -07:00
daan
cd52d0a6d9
merge dev-win
2019-08-20 17:31:46 -07:00
daan
13ef8a049b
allow larger large objects to better use segment space
2019-08-19 21:22:09 -07:00
daan
228c5e5507
allow larger large objects to better use segment space
2019-08-19 18:20:51 -07:00
Daan Leijen
fb12f298ca
merge from dev-win, fix small object size check
2019-08-16 19:14:08 -07:00
Daan Leijen
069c26dbab
fix small object size check in mi_segment_page_alloc
2019-08-16 18:40:30 -07:00
daan
a0b4ac2f66
new segment allocation; good results with Qas service
2019-08-15 23:19:52 -07:00
daan
f2bafbc57f
wip: new segment allocation
2019-08-15 11:49:56 -07:00
daan
bbd81bbbd1
wip: new segment allocation with flexible large objects
2019-08-15 00:46:45 -07:00
daan
0fd898315c
per thread region search index
2019-08-11 12:15:13 -07:00
daan
2e924150ae
further layout improvement for msvc code generation
2019-08-11 11:30:24 -07:00
daan
7b105c4810
improve layout of page for x64
2019-08-11 10:31:00 -07:00
daan
dbe010f2d4
add huge and giant stats; increase bins
2019-08-10 20:51:37 -07:00