3 ms·
You're looking at Oilpan, which is the C++ GC for Blink, not the one for V8. But, the V8 one is very similar in many respects (the same team works on both), in
by Leszek 4y ago
You're looking at Oilpan, which is the C++ GC for Blink, not the one for V8.
But, the V8 one is very similar in many respects (the same team works on both), including linear allocation buffers.
- rockwotj 4y agoThey are one and the same I as I understand it now: https://v8.dev/blog/oilpan-library https://v8.dev/blog/oilpan-library https://github.com/v8/v8/blob/main/include/cppgc/README.md https://github.com/v8/v8/blob/main/include/cppgc/README.md Quote for the frist article: > We launched the library [Oilpan] in V8 v9.4 and enabled it in Blink starting in Chromium M94.
- Leszek 4y agoIt's a bit confusing, I agree -- Oilpan is part of the V8 sources for shipping-the-org-chart reasons, but it isn't actually the GC used by V8 itself for JavaScript objects and the JS heap, it's the GC used by Blink for DOM objects etc. The biggest difference between the two is that JS objects are fully managed by the GC and V8 has full control over their layout and access (e.g. they are accessed via explicit pointer + field offset in the runtime), while Oilpan works on C++ objects; there's a billion consequences of this, in particular that JS objects are movable (because we can safely update pointers) and Oilpan objects aren't (because C++ can do pretty much whatever it wants).