我在 MRuby 代码中进行救援时收到此错误:
arena overflow error
我不熟悉这个术语以及如何修复它。这是我的 C 程序的示例:
while (true) {
SDL_Event event;
if (SDL_PollEvent(&event)) {
if (event.type == SDL_QUIT) break; //exit the loop
switch(event.type) {
case SDL_KEYDOWN:
if (event.key.keysym.sym == SDLK_LEFT) { key = "left"; code = "input_received(:left)"; }
//...
printf("Key down: %s\n", key);
mrb_load_string(mrb, code);
break;
}
}
// Re-render each iteration
mrb_load_string(mrb, "render()"); //<-- this is the line that causes the error
}