How to run a dart program with big memory?

2019-02-18 00:44发布

问题:

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.

回答1:

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.



标签: memory dart