We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d34d763 commit f9385f6Copy full SHA for f9385f6
py/gc.c
@@ -331,6 +331,7 @@ static size_t compute_heap_size(size_t total_blocks) {
331
static bool gc_try_add_heap(size_t failed_alloc) {
332
// 'needed' is the size of a heap large enough to hold failed_alloc, with
333
// the additional metadata overheads as calculated in gc_setup_area().
334
+ // CIRCUITPY-CHANGE: calculation of how much to grow the heap
335
size_t total_new_blocks = (failed_alloc + BYTES_PER_BLOCK - 1) / BYTES_PER_BLOCK;
336
size_t needed = compute_heap_size(total_new_blocks);
337
0 commit comments