Allocation failed - process out of memory

346 views
Skip to first unread message

Victor Grishchenko

unread,
Oct 24, 2008, 3:47:24 PM10/24/08
to v8-u...@googlegroups.com
Hi, v8 users!

My program fails with:
----------------------------------------------------
#
# Fatal error in CALL_HEAP_FUNCTION
# Allocation failed - process out of memory
#

Abort trap
----------------------------------------------------

The actual program memory consumption did not seam that high (around
250M of "Real Memory" - as Mac OS X names it). The computer has 4Gb of
RAM and the environment has no limitations on RSS:
max memory size (kbytes, -m) unlimited
virtual memory (kbytes, -v) unlimited

So, I am puzzled about the reason. I am using revision 592 checked out
as:
svn checkout http://v8.googlecode.com/svn/trunk/ v8

BTW, many related places in the source code have a comment:
/* TODO(1181417): Fix this. */
Is it some internal tracking id?

So guys, any ideas?

--

V

Victor Grishchenko

unread,
Oct 27, 2008, 8:07:15 AM10/27/08
to v8-u...@googlegroups.com
I found v8 garbage collecting patterns quite entertaining. The
attached graph represents the number of currently allocated buffers.
Buffers are wrapped by JavaScript objects, so deallocation happens on
garbage collection. Due to the specifics of the program, it never
needs more than 5000 buffers at once (actually, 2000+). CPU
utilization is 2-5%. Still, out-of-memory is inevitable.
v8-gc-graph.png

Victor Grishchenko

unread,
Oct 27, 2008, 9:20:57 AM10/27/08
to Victor Grishchenko, v8-u...@googlegroups.com
Bingo!

The attached script drives v8 gc mad. It eats up to 200Mb of RAM
having just 2000 objects active. Actually, memory consumption
oscillates by an order of magnitude, i.e. between 300Mb and 20Mb. Both
on my Mac and my colleague's Linux it starts to hyperoscillate having
queue size of 2000 and suddenly stops oscillating on 4000.
I use trunk, revision 605.

> <v8-gc-graph.png>
>
> http://www.tribler.org/attachment/wiki/PEXCrawl/v8-gc-graph.png

drive-gc-mad.js
Reply all
Reply to author
Forward
0 new messages