diff options
Diffstat (limited to 'py/modgc.c')
| -rw-r--r-- | py/modgc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/modgc.c b/py/modgc.c index c11bcaecd..7b18045b0 100644 --- a/py/modgc.c +++ b/py/modgc.c @@ -64,7 +64,12 @@ MP_DEFINE_CONST_FUN_OBJ_0(gc_isenabled_obj, gc_isenabled); STATIC mp_obj_t gc_mem_free(void) { gc_info_t info; gc_info(&info); + #if MICROPY_GC_SPLIT_HEAP_AUTO + // Include max_new_split value here as a more useful heuristic + return MP_OBJ_NEW_SMALL_INT(info.free + info.max_new_split); + #else return MP_OBJ_NEW_SMALL_INT(info.free); + #endif } MP_DEFINE_CONST_FUN_OBJ_0(gc_mem_free_obj, gc_mem_free); |
