2020-06-03 23:40:05 +01: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 22:37:26 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "py/mpstate.h"
|
|
|
|
#include "py/gc.h"
|
|
|
|
|
2021-07-09 14:19:15 +10:00
|
|
|
#include "shared/runtime/gchelper.h"
|
2016-02-11 22:37:26 +00:00
|
|
|
|
2020-04-23 16:12:55 +10:00
|
|
|
#if MICROPY_ENABLE_GC
|
2016-02-11 22:37:26 +00:00
|
|
|
|
|
|
|
void gc_collect(void) {
|
|
|
|
gc_collect_start();
|
2020-04-23 16:12:55 +10:00
|
|
|
gc_helper_collect_regs_and_stack();
|
2016-02-11 22:37:26 +00:00
|
|
|
gc_collect_end();
|
|
|
|
}
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
#endif // MICROPY_ENABLE_GC
|