From 0e32b6cccbfa39437398defe1bfd5d17022e4cf8 Mon Sep 17 00:00:00 2001
From: Sebastian Krzyszkowiak <dos@dosowisko.net>
Date: Thu, 12 Oct 2023 00:05:45 +0200
Subject: [PATCH] gc collect

---
 components/micropython/vendor/py/qstr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/components/micropython/vendor/py/qstr.c b/components/micropython/vendor/py/qstr.c
index 3daba6e569..6641c460c9 100644
--- a/components/micropython/vendor/py/qstr.c
+++ b/components/micropython/vendor/py/qstr.c
@@ -137,6 +137,7 @@ STATIC const qstr_pool_t *find_qstr(qstr *q) {
 // qstr_mutex must be taken while in this function
 STATIC qstr qstr_add(mp_uint_t hash, mp_uint_t len, const char *q_ptr) {
     DEBUG_printf("QSTR: add hash=%d len=%d data=%.*s\n", hash, len, len, q_ptr);
+    gc_collect();
 
     // make sure we have room in the pool for a new qstr
     if (MP_STATE_VM(last_pool)->len >= MP_STATE_VM(last_pool)->alloc) {
-- 
GitLab