Hi Dennis,

V8's GC is stop-the-world type so you don't have to do anything
special to make it "keep up". If you are getting OOM that most
probably means you have a leak somewhere. Try tracing GC with
--trace-gc flag to see how heap grows.

Also you can't run JavaScript in parallel on V8 unless you create
several isolates.

If you are using a single isolate from many threads you have to ensure
that only one thread is executing JS at the given moment.

--
Vyacheslav Egorov


On Wed, Aug 31, 2011 at 2:28 AM, Dennis H <[email protected]> wrote:
> Dear v8 Developers,
>
> I am relatively new to v8 internals, but here is what I found:
> I tried to create an app which has multiple tasks running in parallel.
> The v8::internal::Thread API seems to work fine, the trouble is I
> didn't find a good way to make garbage collection to keep up.
>
> I do call the V8::IdleNotification() in the main event loop
> periodically, but it doesn't scale if number of threads is getting
> bigger. Essentially If I create a lot of tasks, the process would
> reliably run out of memory pretty quick.
>
> How is the garbage collection supposed to be handled correctly with
> multiple threads?
>
> I used v3.4.14.
>
> Thanks,
> Dennis
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to