为Dart VM分配更多RAM [英] Allocate more RAM for the Dart VM

查看:112
本文介绍了为Dart VM分配更多RAM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Dart中创建了一些非常消耗内存的程序。他们总是运行,但现在的Dart VM的RAM是不够的。所以,我的问题是:如何为Dart VM分配更多RAM?

I've created some very memory consuming programs in Dart. They always ran, but now the RAM for the Dart VM is not enough. So, my question is: How can I allocate more RAM for the Dart VM?

我已经检查了文档此处以及通过 dart --help -v 的文档,但找不到可以指定RAM的量。

I've checked the documentation here and also the documentation via dart --help -v but couldn't find a possibility to specify an amount of RAM. Could anyone please tell me how to get more RAM?

推荐答案

我设置了一个环境变量来实现这个

I set an environment variable to achieve this


export DART_VM_OPTIONS = - old_gen_heap_size = 2048

export DART_VM_OPTIONS="--old_gen_heap_size=2048"

但我认为您也可以将其作为参数传递

but I think you can also pass it as argument


dart --old_gen_heap_size = 2048 -c somefile.dart

dart --old_gen_heap_size=2048 -c somefile.dart

另请参阅

  • How to run a dart program with big memory?
  • How do I properly download and save a list of images?

这篇关于为Dart VM分配更多RAM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆