mxmlc 的 Ant gc 任务?
在我的项目中,我使用 Ant 作为构建脚本。在编译阶段我必须编译大约 20 个模块,而且这个数字还在增长。为了编译我的模块,我依次调用 mxmlc 任务。一切都按预期工作,除了 mxmlc 似乎没有释放内存。
我已经设置了:
export ANT_OPTS="-Xms1536m -Xmx1536m -XX:PermSize=1024m -XX:MaxPermSize=2048m"
但是我的构建脚本已经达到了限制。所以我很好奇是否有什么方法可以释放未使用的内存?或者也许还有另一种避免内存泄漏的简便方法?
作为一个想法,我考虑创建额外的构建脚本,该脚本需要一些参数并且仅构建一个模块,并从我的主构建脚本中调用此 Flex 构建脚本作为外部应用程序。但这是一个黑客行为。很高兴知道一些更专业的方法来处理它......
提前谢谢大家!
In my project I use Ant as a build script. During compile phase I have to compile about 20 modules and the number is growing. To compile my modules I sequentially call mxmlc task. Everything works as expected except that it seems that mxmlc doesn't release memory.
I already set:
export ANT_OPTS="-Xms1536m -Xmx1536m -XX:PermSize=1024m -XX:MaxPermSize=2048m"
But my build script already reaches the limit. So, I am curious if there is any way to release unused memory? Or maybe there is another handly way to avoid memory leaks?
As an idea I consider to create additional build script that takes some args and does build only of one module and call this flex build script from my main build script as a external app. But it is a hack. Would be great to know some more professional way to handle it...
Thank you all in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了这个问题,并通过 mxmlc fork 的 ANT 任务解决了它:
这会导致 mxmlc 生成另一个用于编译(每个应用程序/模块)的进程。
I had this problem and solved it by having the ANT task for mxmlc fork:
This causes mxmlc to spawn another process for the compiling (of each application/module).
作为临时解决方案,我已经实现了上述的“想法”。实际上效果很好。希望它对某人有用。
As a temporal solution I have implemented my "idea" described above. Works actually fine. Hope it will be usefull for somebody.