I've been puzzling over V8 GC behavior for the past few days. I made a really simple program which copies content of one array into another (https://gist.github.com/anvaka/5423226 ), and I'm seeing lots of garbage collection in the d8 console with --trace_gc flag. But, with very simple tweaks garbage is not produced:
This does not happen when arrays contain integer numbers This does not happen when any of the array's elements is printed to the console before or after the copy cycles This does not happen when the copy is executed within a function scope. Looking at the GC histograms "garbage" is comprised of nothing but HEAP_NUMBER_TYPE. When debugging the v8 source code I indeed see tones of calls to Runtime_AllocateHeapNumber in the runtime.cc file, but unfortunately my assembly programming skills do not allow me to fully understand what's going on here. Can someone shed some light on this behavior? -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
