Commit graph

304 commits

Author SHA1 Message Date
daanx
68f5fb2f4b wip: further progress on segment removal; arena allocation 2024-11-29 15:08:06 -08:00
daanx
46afcbe06c wip: further progress on segment removal; arena allocation 2024-11-29 14:28:34 -08:00
daanx
441d4fed9f wip: further progress on removing segments 2024-11-29 10:40:18 -08:00
daanx
0e76fe3798 add address hint to primitive allocation API 2024-11-16 16:57:37 -08:00
QuarticCat
632421da3a
fix typos 2024-06-19 10:49:03 +08:00
Daan
08fa864605 rename arena-abandoned to arena-abandon 2024-06-03 21:30:02 -07:00
daanx
76b0873ce2 fix asan tracking by explicitly setting memory to undefined before a free 2024-06-03 20:28:47 -07:00
daanx
f7ba9d9da0 refactor arena-abandoned to be an include for backward compat with existing build scripts 2024-06-03 18:04:59 -07:00
daanx
800034cb99 refactor arena abandonment in a separate file 2024-06-03 17:58:34 -07:00
daanx
96b69d7ef6 fix leak where OS abandoned blocks were not always reclaimed 2024-06-03 17:28:14 -07:00
daanx
00dacba91f maintain count of the abandoned os list 2024-06-03 15:44:25 -07:00
daanx
3333f776f9 push os abandoned blocks at the tail end 2024-06-03 15:37:05 -07:00
daanx
a04905c88b revisit atomic reclaim for abandoned segments 2024-06-03 15:20:35 -07:00
daanx
f02a0b3541 more aggressive reclaim from free for OS blocks 2024-06-03 14:05:57 -07:00
Daan
84334e480a decrease meta allocation zone to 4k (to reduce .bss) 2024-06-03 09:54:41 -07:00
Daan
6b15342709 fix pthread initalization of mutexes 2024-06-02 16:41:07 -07:00
daanx
a964322a21 revise the segment map to only apply to OS allocated segments and reduce the .BSS footprint 2024-06-02 14:46:59 -07:00
daanx
5501f59f6c only reclaim for exclusive heaps in their associated arena 2024-06-02 13:16:20 -07:00
daanx
635d626c82 fix leak in abandoned block visiting 2024-06-02 10:43:41 -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
daanx
d9aa19a763 add support for sub-processes (to supportpython/cpython#113717) 2024-06-01 15:57:18 -07:00
daanx
f87a4c15b2 increase max arenas 2024-06-01 13:41:13 -07:00
daanx
aeee7907a0 fix spelling 2024-06-01 13:20:28 -07:00
daanx
616db104a9 prevent UB in arena reservation 2024-06-01 12:29:48 -07:00
Daan
a05e1f4868 comment to not add custom fields (issue #896) 2024-05-17 09:12:03 -07:00
Daan
8fd1184272 fix alignment issue on Alpine 32-bit musl compilation (issue #895) 2024-05-17 09:06:27 -07:00
Daan
97013ee2b4 improve static allocation 2024-05-16 19:16:44 -07:00
Daan
aa91fe0f1c fix build warning on 32-bit musl 2024-05-16 19:05:24 -07:00
Daan
e3fea8f4e1 temporary fix for musl libc 32-bit compilation on alpine (see issue #895) 2024-05-16 18:58:18 -07:00
Daan
a527f75161 add disallow_arena_alloc option 2024-04-22 10:10:20 -07:00
Daan
88aa84727d fix spelling errors (pr #710) 2024-04-20 17:12:09 -07:00
Daan
bf5932c3c6 use better purging for segments_collect 2024-04-19 12:43:05 -07:00
Daan
70eb7fb390 collect arenas even if not on the main thread (issue #878) 2024-04-19 12:01:26 -07:00
Daan
40517890d4 Merge branch 'dev' into dev-abandon 2024-03-03 14:15:21 -08:00
Daan
719496bac9 fix clang warning 2024-03-03 13:22:24 -08:00
Daan
fa10914f73 track os stats in the main stats directly 2024-03-03 13:19:27 -08:00
Daan
56d1a859ca Merge branch 'dev' into dev-abandon 2024-03-03 09:37:53 -08:00
Daan
027b22aaf2 add arena stats 2024-03-03 09:37:46 -08:00
daanx
43d40704b9 keep threadid 0 for abandoned_next to preserve invariants 2024-03-02 18:24:53 -08:00
daanx
70e3ce07d1 Merge branch 'dev' into dev-abandon 2024-03-02 17:34:58 -08:00
Daan
cc4500a024 ensure consistent types for template deduction, PR #834 by @dg0yt 2024-03-02 15:36:57 -08:00
daanx
8045d55179 fix type warning on clang 2024-03-01 19:04:34 -08:00
daanx
5ce1a9bfef fix cas call 2024-03-01 18:58:11 -08:00
daanx
500d2ad1fd ensure non-arena segments are force purged on abandonment; make non-arena reclaim atomic 2024-03-01 18:47:59 -08:00
daanx
16c0948ee5 improve display of arenas and contained blocks 2024-03-01 16:24:28 -08:00
daanx
c4f1f2e079 make reclaim tries a percentage of the abandoned count 2024-03-01 14:57:46 -08:00
daanx
cf8f73098e start abandoned search randomized 2024-03-01 10:51:18 -08:00
daanx
71bcf1c76b maintain abandoned_count more robustly 2024-03-01 10:31:58 -08:00
daanx
d34d8f0f65 fix signed comparison 2024-02-29 15:39:47 -08:00