5 comments

  • MaxBarraclough12 hours ago
    It&#x27;s a non-moving collector. It might be high performance by the standards of C++ garbage collectors, but I doubt its performance could be anywhere near what a decent JVM can manage, especially in the absence of finalizers&#x2F;destructors.<p>As Ron Pressler (<i>pron</i> here on HN) has been emphasising recently, [0] the &#x27;sweep&#x27; phase of a moving garbage collector is unaffected by the size or number of dead objects in the heap (at least in the typical case, where there are no finalizers). This isn&#x27;t the case here though (it uses free lists), or in any C++ GC.<p>The policy of running all destructors on the same thread doesn&#x27;t really seem like &#x27;high performance&#x27; architecture either, even if there are good reasons for it.<p>Still a neat project though. I rather like this:<p>&gt; <i>Oilpan uses a Clang plugin that statically verifies, among many other things, that no heap objects are accessed during destruction of an object</i><p>I&#x27;m not sure I understand this:<p>&gt; <i>Oilpan is a garbage collector written in C++ for managing C++ memory that can be connected to V8 using cross-component tracing that treats the tangled C++&#x2F;JavaScript object graph as one heap.</i><p>In what sense are they treated as one heap? How can they be, given that V8 uses a moving GC for its JavaScript heap? Does it just mean there&#x27;s some mechanism for a C++ object to refer to a JavaScript object, and vice versa?<p>[0] <a href="https:&#x2F;&#x2F;youtu.be&#x2F;xr73mR7ii9M?t=1081" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;xr73mR7ii9M?t=1081</a> <i>Principles of Memory Management in Java</i>, September 2026
    • monster_truck34 minutes ago
      Node 26 added a bunch of profiling stuff that should make this a bit easier to pick apart. I&#x27;m being lazy and waiting for perfetto support on windows to get fixed so I haven&#x27;t bothered yet
  • d_finch11 minutes ago
    Interesting, but I still see `std::shared_ptr` and careful ownership as the C++ way. GC feels like adding another runtime dependency.
  • Rhaskins40 minutes ago
    Takes me back to trying to wrangle memory in a large C++ app. True high-perf GC would&#x27;ve been a godsend then.
  • sctb11 hours ago
    More GC for C++ in v8, I thought? Nope: (2020)
  • nonmaskable51 minutes ago
    [flagged]