Angus Gratton
519c24dd48
py/gc: Add new MICROPY_GC_SPLIT_HEAP_AUTO "auto grow heap" mode.
...
When set, the split heap is automatically extended with new areas on
demand, and shrunk if a heap area becomes empty during a GC pass or soft
reset.
To save code size the size allocation for a new heap block (including
metadata) is estimated at 103% of the failed allocation, rather than
working from the more complex algorithm in gc_try_add_heap(). This appears
to work well except in the extreme limit case when almost all RAM is
exhausted (~last few hundred bytes). However in this case some allocation
is likely to fail soon anyhow.
Currently there is no API to manually add a block of a given size to the
heap, although that could easily be added if necessary.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-15 10:48:02 +10:00
..
2022-12-06 13:34:52 +11:00
2023-04-27 18:03:06 +10:00
2023-04-27 18:03:06 +10:00
2022-11-28 11:23:22 +11:00
2022-12-08 12:27:23 +11:00
2023-06-14 19:03:46 +10:00
2023-06-02 21:59:47 +10:00
2023-06-08 17:54:24 +10:00
2023-07-13 14:56:33 +10:00
2023-07-13 13:50:50 +10:00
2022-12-08 12:27:23 +11:00
2022-09-19 19:06:15 +10:00
2023-03-09 12:13:12 +11:00
2023-04-27 18:03:06 +10:00
2023-03-09 12:13:12 +11:00
2023-04-27 18:03:06 +10:00
2023-04-27 18:03:06 +10:00
2023-08-15 10:48:02 +10:00
2023-08-15 10:48:02 +10:00
2023-06-14 19:11:04 +10:00
2023-04-27 18:03:06 +10:00
2023-06-14 19:03:46 +10:00
2023-02-02 12:51:03 +11:00
2023-06-08 17:54:24 +10:00
2023-03-10 18:39:14 +11:00
2023-01-13 14:21:32 +11:00
2022-10-12 00:33:09 +11:00
2022-09-29 14:17:37 +02:00
2023-02-08 12:24:15 +11:00
2023-06-15 11:02:15 +10:00
2023-06-08 17:54:21 +10:00
2023-04-27 18:03:06 +10:00
2023-06-08 17:54:21 +10:00
2023-06-08 17:54:21 +10:00
2023-06-08 17:54:21 +10:00
2023-02-24 15:55:12 +11:00
2023-03-10 10:58:10 +11:00
2023-06-08 17:54:21 +10:00
2023-06-14 19:03:46 +10:00
2022-09-19 19:06:15 +10:00
2023-08-15 10:48:02 +10:00
2023-06-08 17:54:11 +10:00
2023-08-04 17:25:16 +10:00
2023-06-02 21:50:57 +10:00
2023-06-02 21:50:57 +10:00
2023-06-14 17:43:44 +10:00
2022-11-15 17:09:49 +11:00
2023-06-02 21:47:34 +10:00
2023-06-01 14:18:54 +10:00
2023-06-08 17:54:24 +10:00
2023-05-19 13:33:54 +10:00
2023-01-20 16:31:37 +11:00
2022-09-19 19:06:15 +10:00
2023-06-08 17:54:11 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2023-06-08 17:54:11 +10:00
2022-09-19 19:06:15 +10:00
2023-06-08 17:54:11 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2023-05-19 12:04:44 +10:00
2023-05-19 12:04:44 +10:00
2022-09-19 19:06:15 +10:00
2023-06-01 13:01:07 +10:00
2023-06-01 13:01:07 +10:00
2023-06-01 15:11:06 +10:00
2023-06-08 17:54:11 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2023-06-14 19:03:46 +10:00
2023-06-14 19:03:46 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2023-06-08 17:54:11 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:15 +10:00
2023-05-19 12:04:44 +10:00
2023-05-19 12:06:06 +10:00
2023-06-08 17:54:11 +10:00
2022-10-11 17:50:19 +11:00
2023-07-21 18:49:03 +10:00
2023-06-08 17:54:11 +10:00
2023-06-08 17:54:11 +10:00
2023-06-01 13:01:07 +10:00
2022-09-19 19:06:16 +10:00
2022-09-19 19:06:15 +10:00
2022-09-19 19:06:07 +10:00
2023-06-08 17:54:11 +10:00
2023-06-14 17:32:01 +10:00
2022-12-08 12:27:23 +11:00
2022-12-08 12:27:23 +11:00
2023-05-19 12:04:44 +10:00
2023-06-08 17:54:17 +10:00
2023-06-08 17:54:17 +10:00
2022-09-19 23:27:08 +10:00
2023-06-08 17:54:21 +10:00
2023-05-01 16:47:03 +10:00
2023-05-01 16:47:03 +10:00
2023-06-01 13:01:07 +10:00
2023-07-24 15:04:27 +10:00
2023-06-08 17:54:24 +10:00
2023-03-21 18:08:57 +11:00
2023-04-27 18:03:06 +10:00
2023-04-27 18:03:06 +10:00
2023-05-04 10:08:12 +10:00
2023-07-21 18:49:03 +10:00
2023-07-21 18:49:03 +10:00
2023-03-21 18:08:57 +11:00