限制Jython解释器内存usag

2024-10-01 19:19:14 发布

您现在位置:Python中文网/ 问答频道 /正文

有没有办法限制Jython解释器使用的内存量?

我已经研究过如何从python脚本内部限制内存使用,但是我找不到一个跨平台的方法来做到这一点。在

interpreter = new PythonInterpreter();
interpreter.setMemoryLimit(1024) //something like this for example
interpreter.execfile("mycode.py");

Tags: 方法内存脚本newfor跨平台jythonthis

热门问题