Live data from Hacker News

Real-Time Garbage Collection Is Real

michaelrbernste.in

61–62 of 62 posts

Re: Real-Time Garbage Collection Is Real

#61
I'd love to try implementing C4 or Metronome or Staccato, and I have some interesting applications for them too. The problem is all this development is sponsored by Azul, Microsoft, and IBM. All the Bacon papers have corresponding IBM patents, all the Petrank papers have corresponding Microsoft patents. It sucks. Even if I come up with something new, it'll look like a slight variant on something someone else has done and I don't want to get sued!

Re: Real-Time Garbage Collection Is Real

#62
post #54

Earlier quoted context omitted.

If the mass objects have trivial (ignorable) destructors and don't own any heap-allocated subobjects then it's not a problem. You can have top-level objects like levels or documents or sessions own everything directly and indirectly under them and allocate those things out of a private heap that can ideally be reused but otherwise be bulk freed in a few calls. Unfortunately, the standard C++ philosophy around RAII an…

So, if I design a language, how design it well? I suspect is easy to kill all values (ints, str, etc) and arrays/list of it. But how know what is a "don't own any heap-allocated subobject" (sorry to ask if this is obvious, I have not deep experience in this matters)? Is not circular references the real problem? And what when the object reference a resource like a file/handle/database/etc? So, could be good idea to ma…

This is not necessarily a language-level decision (except for GC, it helps in this case spread out the deallocations when using incremental GC).

You just have to be aware what happens in the destructor when you manually free an object. Libraries can make knowing this more difficult.

I guess you could build incremental alloc/release pools (even with reuse) or such things but it comes down to being aware of the problem as described and avoiding cascaded releases.

And to be honest this is not a super common problem but it can happen.

Post reply on HN