Yeah, you could do that, or you could use conservative GC. It won’t be perf-competitive with the best GCs though.
-
-
Replying to @pcwalton @slava_pestov and
Why wouldn’t a conservative GC be competitive?
1 reply 0 retweets 0 likes -
Replying to @jfbastien @slava_pestov and
It can’t be a moving GC, which means it can’t have bump allocating TLABs in the nursery. So malloc will be slower than it needs to be.
1 reply 0 retweets 0 likes -
Replying to @pcwalton @slava_pestov and
The JSC GC is conservative and non-moving, seems to be doing fine. Agreed malloc when you can't just bump a pointer isn't as fast, but you have other costs that this, no?
2 replies 0 retweets 0 likes -
Replying to @jfbastien @slava_pestov and
Well, to be honest I don’t really have the motivation for a Twitter debate about GC strategies right now :) Suffice it to say that if you’re targeting C you’re limited in your choice of GC algorithms.
1 reply 0 retweets 2 likes -
Replying to @pcwalton @slava_pestov and
We're debating?
Agreed that targeting C limits GC algorithms. Really it's Boehm or do something else than C
https://www.youtube.com/watch?v=wxrbOVeRonQ …1 reply 0 retweets 1 like -
Replying to @jfbastien @pcwalton and
Boehm is "something else than C". It's 100% filthy UB. But you can do GC in C. Just not on arbitrary C objects, rather higher-level object you implement in terms of C ones.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @jfbastien and
Failure to understand this for decades is the main reason browsers are such buggy, memleaky crap.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @jfbastien and
Hey now, Firefox/Gecko has fully precise hybrid GC/refcounting, with a cycle collector :) Took a mountain of engineering work (
@graydon_pub did a lot of it, in fact!)3 replies 0 retweets 2 likes -
Replying to @pcwalton @jfbastien and
Yet accidentally leaving a Twitter tab open overnight still makes the browser permanently unusable until restart, even after closing the tab.
1 reply 0 retweets 0 likes
Save about:memory next time you see it, I can look at it
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.