如何运行具有大内存的dart程序? [英] How to run a dart program with big memory?

查看:186
本文介绍了如何运行具有大内存的dart程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在dart程序中读取一个非常大的文件(大于1G),但它会抛出内存异常。



如何配置命令行使它以更大的内存运行?正如:

  -Xmx1G 

$ b $ VM中有一个标志来增加堆大小:<$ c

$ c> - old_gen_heap_size 。例如 - old_gen_heap_size = 1204 会将其设置为1GB。



此标志位于开发人员标志和不被认为是稳定的。它可以改变或消失。


I'm trying to read a very big file(more than 1G) in a dart program, but it throws out of memory exception.

How do I configure the command line to make it run with a bigger memory? Just like:

 -Xmx1G

in Java.

解决方案

The VM has a flag to increase the heap size: --old_gen_heap_size. For example --old_gen_heap_size=1204 would set it to 1GB.

This flag is among the developer-flags and is not considered stable. It could change or go away.

这篇关于如何运行具有大内存的dart程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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