[python] Fix garbage collector

Change-Id: I529ff93e7f8841574ff24cb1b6461aa48039ab61
This commit is contained in:
Émilie Feral
2017-08-22 15:50:24 +02:00
parent 6b783346cc
commit e0252c7751
3 changed files with 32 additions and 40 deletions

View File

@@ -2,6 +2,7 @@
extern "C" {
#include <stdlib.h>
#include "port.h"
#include "py/compile.h"
#include "py/runtime.h"
#include "py/gc.h"
@@ -72,6 +73,8 @@ void ExecutorController::ContentView::runPython() const {
// Initialized stack limit
mp_stack_set_limit(40000);
mp_port_init_stack_top();
char * pythonHeap = (char *)malloc(16384);
gc_init(pythonHeap, pythonHeap + 16384);