mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
py: Put all global state together in state structures.
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "py/compile.h"
|
||||
#include "py/runtime0.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "py/gc.h"
|
||||
#include "pyexec.h"
|
||||
#include "gccollect.h"
|
||||
@@ -39,7 +40,7 @@
|
||||
|
||||
void user_init(void) {
|
||||
soft_reset:
|
||||
//mp_stack_set_limit((char*)&_ram_end - (char*)&_heap_end - 1024);
|
||||
mp_stack_set_limit(10240);
|
||||
mp_hal_init();
|
||||
gc_init(&_heap_start, &_heap_end);
|
||||
gc_collect_init();
|
||||
|
||||
Reference in New Issue
Block a user