Commit graph

265 commits

Author SHA1 Message Date
daanx
659a9dd51d fix page info size and order; atomic page flags 2024-12-06 22:37:59 -08:00
daanx
61436a92b9 working simplified version without pairmaps and bitmap epoch 2024-12-06 15:26:01 -08:00
daanx
7443ee317e tune free-ing and abandoning 2024-12-05 17:00:23 -08:00
daanx
bc67be4d79 small adjustments 2024-12-04 21:40:57 -08:00
daanx
bc7fe399b1 large bitmaps working; lock on arena_reserve 2024-12-03 23:35:33 -08:00
daanx
3fc2c8e279 fix assertions 2024-12-03 11:06:07 -08:00
daanx
666c089fc8 revise free reclaim; ensure unown cannot race with a free 2024-12-03 10:51:13 -08:00
daanx
bd5f7de3f4 can run basic test 2024-12-02 20:21:35 -08:00
daanx
d96c134566 wip: initial version with eager abandonment 2024-12-02 16:01:45 -08:00
daanx
1d7a9f62a5 bug fixes 2024-12-01 12:54:16 -08:00
daanx
55b70f1588 wip 2024-11-30 14:00:07 -08:00
daanx
f8d04dc2bc compile with clang and gcc 2024-11-30 12:41:11 -08:00
daanx
9d904e8643 wip: bug fixes 2024-11-30 10:39:30 -08:00
daanx
0f635413d6 wip: can run initial test 2024-11-29 17:50:37 -08:00
daanx
68f5fb2f4b wip: further progress on segment removal; arena allocation 2024-11-29 15:08:06 -08:00
daanx
71cfa45e76 wip: initial work on mimalloc3 without segments 2024-11-28 19:31:04 -08:00
Daan
cd61eb7cf1
Merge pull request #961 from devnexen/windows_tighten_criterias
_mi_memcpy/_mi_memzero: tighten criteria for intrinsics for windows.
2024-11-25 19:25:26 -08:00
daanx
d57cb0765d add guarded objects that are sampled (and fit a size range). guarded sample rate etc can be set per heap as well as defaulted with options 2024-11-17 22:45:09 -08:00
daanx
8ba1879073 add sampling for guarded objects 2024-11-17 00:06:16 -08:00
David Carlier
9f0a7ac0be
_mi_memcpy/_mi_memzero: tighten criteria for intrinsics for windows.
FSRM is better used for buffer <= 128 bytes and ERMS, if supported for larger
chunks.
2024-11-16 10:05:14 +00:00
Daan
d951b4dd23 add missing mi_thread_done definition 2024-10-23 00:53:17 -07:00
Daan
aa881733d7 reorganize primitives for process initialization; use special data segment on Windows for thread termination by default on Windows now (issue #869) 2024-10-21 22:56:59 -07:00
daanx
b1188ea336 fix potential race on subproc field in the segment 2024-06-03 20:57:00 -07:00
daanx
96b69d7ef6 fix leak where OS abandoned blocks were not always reclaimed 2024-06-03 17:28:14 -07:00
Daan
f17ddc3395 increase thread data cache to32 entries 2024-06-03 09:55:02 -07:00
daanx
855e3b2549 add support to visit _all_ abandoned segment blocks per sub-process, upstream for python/cpython#114133 2024-06-02 09:41:12 -07:00
daanx
8f874555d5 add initial support for visiting abandoned segments per subprocess, upstream for python/cpython#114133 2024-06-02 07:47:08 -07:00
Daan Leijen
f93fb900b7 move lock code to atomic.h 2024-06-01 17:25:45 -07:00
daanx
d9aa19a763 add support for sub-processes (to supportpython/cpython#113717) 2024-06-01 15:57:18 -07:00
Daan
0c4041fa53 add support for custom heap and page tags, upstream of python/cpython#113742 2024-05-19 08:06:32 -07:00
Daan
710d6138c7 refactor thread meta-data initilazation, upstream of python/cpython#113263 2024-05-18 17:42:47 -07:00
Daan
e7f2ffe26c fix build warning on alpine 32-bit 2024-05-16 18:53:50 -07:00
Daan Leijen
0022802177 commend and make at least 8 tries for reclaim 2024-03-25 15:25:04 -07:00
daanx
006ae2d055 add is_huge page flag to ensure the right page queue is returned (see #868) 2024-03-24 17:07:28 -07:00
Daan Leijen
b5665f0eec add full block_size and page_start to page info 2024-03-24 14:17:17 -07:00
Daan Leijen
60c4a0fe56 fix compilation warnings for new uint16_t size for used field 2024-03-24 08:10:35 -07:00
Daan
cc809b0cd4 take 16 bits from used field to create a fast unalign path 2024-03-18 01:40:03 -07:00
daanx
5fe83bf327 limit reclaim from free to half the segments to prevent a pure freeing thread to reclaim too many segments 2024-03-03 17:38:50 -08:00
Daan
027b22aaf2 add arena stats 2024-03-03 09:37:46 -08:00
Daan
16c3f1292c Fix compile error on OpenBSD #773, by @sundb 2024-03-02 16:57:10 -08:00
daanx
d7a72c4912 fix thread data leak; issue #748 2023-05-19 09:12:46 -07:00
daanx
632edf9996 rename was_zero/committed to initially_zero/committed 2023-04-24 09:03:43 -07:00
daanx
b845be241a wip: use memid for OS allocation 2023-04-18 16:38:47 -07:00
daanx
f42c66ccce fix build on vs2017/2019 2023-04-17 10:13:36 -07:00
daanx
a655c28b66 cleanup 2023-04-16 12:29:21 -07:00
daanx
0174d19af3 increase thread data cache to 16 2023-04-15 19:49:14 -07:00
daanx
48d0d0da9b fix thread data cache to use pure os alloc 2023-04-13 15:27:20 -07:00
daanx
0ba79d01f6 allow static allocation in arenas for internal metadata 2023-04-13 13:19:39 -07:00
daanx
eb62caeda0 allow per page purging instead of reset 2023-04-08 17:37:58 -07:00
daanx
55df1f3a54 more detailed stats, including purges 2023-04-05 09:48:22 -07:00