Exhausting heap space

1,332 views
Skip to first unread message

Richard Griffith

unread,
Dec 14, 2012, 10:43:57 PM12/14/12
to mi...@dartlang.org
Hello,

I'm trying to work with somewhat large-ish data in the Dart editor and am running into some memory problems:

Exhausted heap space, trying to allocate 80016 bytes.
Unhandled exception:
Out of Memory

Is it really struggling to allocate 80kB?  I tried increasing -Xmx to something like 2048m, but then the Dart editor wouldn't start (I get the failed to start the java virtual machine message), so I put it back to 1200m.

Is this fundamental to the editor or is there something else I can do to increase the heap space.  Should I be looking at the command line VM instead or would I be up against the same limitation?

Thanks for any suggestions,
Richard

James Wendel

unread,
Dec 14, 2012, 11:14:11 PM12/14/12
to mi...@dartlang.org
It failed on the 80k malloc as it was the last memory request that made it go over the limit.

Maybe this will help?

http://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F

Richard Griffith

unread,
Dec 14, 2012, 11:26:50 PM12/14/12
to mi...@dartlang.org
Thanks James.  That makes sense, although I think a total number would be more informative.  Already tried increasing Xmx but then the editor won't start.  Looking at other options.  Thanks again.



--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart



Devon Carew

unread,
Dec 14, 2012, 11:40:30 PM12/14/12
to General Dart Discussion
Hi Richard,

That -Xmx number is the one way you can increase the Editor's heap. You don't say what platform you're running it on, but you might try downloading and running the editor on a 64-bit JVM. It's my understanding that the maximum heaps you can set are much larger for 64 bit JVMs. You'll need to download a 64 bit version of the editor as well as I don't think the 32 bit editor will run on a 64 bit VM.

Reducing our heap usage is a priority for us, and something we hope to address in the next few weeks. Cheers,

Devon


--
Devon Carew
Software Engineer
Google, Inc.

Richard Griffith

unread,
Dec 15, 2012, 6:44:41 AM12/15/12
to mi...@dartlang.org
Hi Devon,

This is a 32 bit Windows machine but I have a 64 bit I can use.  I'll give that a try.  Thanks!

Richard

Seth Ladd

unread,
Dec 17, 2012, 3:30:35 PM12/17/12
to General Dart Discussion
Hi Richard,

Do you get the same OOM if you run the same program on the command line?

Thanks,
Seth



Richard

--

Richard Griffith

unread,
Dec 17, 2012, 4:54:33 PM12/17/12
to mi...@dartlang.org
Hi Seth,

I did get the same message running it from the command line.  I also tried it on a 64 bit machine and was able to increase -Xms quite a but it didn't make any difference.  I spent some time this weekend trying to figure out why that would be the case but didn't really come up with anything.  Haven't had a chance to get back to it though.

Thanks,
Richard

Seth Ladd

unread,
Dec 18, 2012, 11:49:42 AM12/18/12
to General Dart Discussion
On Mon, Dec 17, 2012 at 1:54 PM, Richard Griffith <scribe...@gmail.com> wrote:
Hi Seth,

I did get the same message running it from the command line.  I also tried it on a 64 bit machine and was able to increase -Xms quite a but it didn't make any difference.  I spent some time this weekend trying to figure out why that would be the case but didn't really come up with anything.  Haven't had a chance to get back to it though.

If the code and data is public, we could take a look for you. I wonder if there are any VM flags that can help track this down.

Seth 

Richard Griffith

unread,
Dec 18, 2012, 1:26:10 PM12/18/12
to mi...@dartlang.org
Thanks, Seth.  I used a different data structure and did some preprocessing to reduce the size of the data I had to work with and that worked.  I don't know why I didn't see any improvement moving to a 64 bit JVM and upping the -Xms, though.  If I get a chance, I will try to track that down.  Thanks again. 


--
Reply all
Reply to author
Forward
0 new messages