mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
@@ -42,7 +42,7 @@ extern uint gc_collected;
|
||||
STATIC mp_obj_t py_gc_collect(void) {
|
||||
gc_collect();
|
||||
#if MICROPY_PY_GC_COLLECT_RETVAL
|
||||
return MP_OBJ_NEW_SMALL_INT((machine_uint_t)gc_collected);
|
||||
return MP_OBJ_NEW_SMALL_INT((mp_uint_t)gc_collected);
|
||||
#else
|
||||
return mp_const_none;
|
||||
#endif
|
||||
@@ -64,14 +64,14 @@ MP_DEFINE_CONST_FUN_OBJ_0(gc_enable_obj, gc_enable);
|
||||
STATIC mp_obj_t gc_mem_free(void) {
|
||||
gc_info_t info;
|
||||
gc_info(&info);
|
||||
return MP_OBJ_NEW_SMALL_INT((machine_uint_t)info.free);
|
||||
return MP_OBJ_NEW_SMALL_INT((mp_uint_t)info.free);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_0(gc_mem_free_obj, gc_mem_free);
|
||||
|
||||
STATIC mp_obj_t gc_mem_alloc(void) {
|
||||
gc_info_t info;
|
||||
gc_info(&info);
|
||||
return MP_OBJ_NEW_SMALL_INT((machine_uint_t)info.used);
|
||||
return MP_OBJ_NEW_SMALL_INT((mp_uint_t)info.used);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_0(gc_mem_alloc_obj, gc_mem_alloc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user