Commit graph

204 commits

Author SHA1 Message Date
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
7128db7bba simplified aligned allocation; improved codegen; fix mi_good_size with padding included; add MI_MAX_ALIGN_GUARANTEE 2024-05-11 06:43:52 -07:00
Daan
09e91ec911 add assert for segment purges 2024-04-19 12:44:23 -07:00
Daan
bf5932c3c6 use better purging for segments_collect 2024-04-19 12:43:05 -07:00
Daan
2b7530e183 add segment_collect for forced heap_collect 2024-04-19 12:33:17 -07:00
Daan
32e065bb32 rename segment_thread_collect to segment_collect 2024-04-19 12:11:58 -07:00
Daan Leijen
460278f110 comments 2024-03-25 16:02:20 -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
6688b45fbd rename MI_ALIGNMENT_MAX to MI_BLOCK_ALIGNMENT_MAX for clarity 2024-03-24 10:57:02 -07:00
Daan Leijen
f141ca12a4 add extra runtime check to ensure we never insert large or huge pages in the segment free queue (issue #870) 2024-03-24 10:53:39 -07:00
Daan Leijen
4f809aadb7 use free field for expiration instead of used 2024-03-24 08:29:56 -07:00
Daan
da52048025 rename local to avoid warning in static build 2024-03-03 18:08:17 -08: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
daanx
43d40704b9 keep threadid 0 for abandoned_next to preserve invariants 2024-03-02 18:24:53 -08:00
daanx
3090f23c25 fix return value of get_reclaim_tries 2024-03-01 18:59:13 -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
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
1b3eb8ef28 quick exit from try_reclaim if no abandoned segments 2024-02-29 19:17:24 -08:00
daanx
931d523dcc update mstress to let the main thread participate 2024-02-29 18:17:58 -08:00
daanx
64edbc92dd allow abandoned segment reclaim on a free 2024-02-29 14:58:59 -08:00
daanx
bdda13b880 track abandoned segments in an arena bitmap instead of with a list 2024-02-29 14:27:28 -08:00
daanx
7020ed5e52 do not purge if purge delay is negative 2024-02-29 11:26:03 -08:00
daanx
632edf9996 rename was_zero/committed to initially_zero/committed 2023-04-24 09:03:43 -07:00
daanx
7f93bf02c9 be explicit about memory tracking in os.c 2023-04-23 16:40:01 -07:00
daanx
c9dd6f6dc9 fix mem tracking for asan 2023-04-23 16:06:58 -07:00
daanx
a59ae585c7 remove allow_purge option 2023-04-23 13:04:50 -07:00
daanx
4cb5b45178 fix possible underflow (issue #731) 2023-04-21 09:37:05 -07:00
daanx
d48b988c40 clean up os api 2023-04-16 11:21:45 -07:00
daanx
0fc4de1440 use rich memid's to simplify the internal API's and invariants 2023-04-15 21:31:17 -07:00
daanx
c90a2bbd0a make memid's abstract for safety 2023-04-13 12:17:52 -07:00
daanx
290443aee6 fix assertion/invariant 2023-04-13 11:41:08 -07:00
daanx
eb62caeda0 allow per page purging instead of reset 2023-04-08 17:37:58 -07:00
daanx
cdefd5b69c fix stats for purging 2023-04-05 11:11:03 -07:00
daanx
96e9e6f570 clean up option naming 2023-04-05 10:11:54 -07:00
daanx
4c4f2f4084 clean up arena function names 2023-04-04 18:13:35 -07:00
daanx
db74fc0c98 add abandoned reader barrier 2023-04-04 16:04:17 -07:00
daanx
a2e1d2b893 add segment map to track valid pointers 2023-04-04 16:00:17 -07:00
daanx
461df1e878 implement arena exclusive heap allocation for dev 2023-04-04 15:40:43 -07:00
daanx
77766e20a6 use only arena's instead of regions 2023-04-04 14:58:06 -07:00
Daan Leijen
cc4ed36c7e prepare for new release 2023-04-03 12:30:18 -07:00
Daan Leijen
f806eb8498 remove redundant OR in mmap flags (pr #675) 2023-03-29 16:15:20 -07:00
Daan Leijen
8e6a475386 add ubsan and tsan to pipeline 2023-03-29 12:13:59 -07:00
Daan Leijen
f58357548c restructure header files 2023-03-20 10:37:39 -07:00
Johannes Schindelin
745a34f475 Fix whitespace
This mostly deletes trailing spaces.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-12-03 00:24:20 +01:00
Daan Leijen
a7bd9c08c8 fix decommit of huge pages 2022-11-23 09:58:45 -08:00