2020-06-03 18:40:05 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright (c) 2013-2014 Damien P. George
|
|
|
|
// SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MIT
|
2016-02-11 17:37:26 -05:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "py/mpstate.h"
|
|
|
|
#include "py/gc.h"
|
|
|
|
|
2020-04-23 02:12:55 -04:00
|
|
|
#include "lib/utils/gchelper.h"
|
2016-02-11 17:37:26 -05:00
|
|
|
|
2020-04-23 02:12:55 -04:00
|
|
|
#if MICROPY_ENABLE_GC
|
2016-02-11 17:37:26 -05:00
|
|
|
|
|
|
|
void gc_collect(void) {
|
|
|
|
gc_collect_start();
|
2020-04-23 02:12:55 -04:00
|
|
|
gc_helper_collect_regs_and_stack();
|
2016-02-11 17:37:26 -05:00
|
|
|
gc_collect_end();
|
|
|
|
}
|
|
|
|
|
2021-03-15 09:57:36 -04:00
|
|
|
#endif // MICROPY_ENABLE_GC
|