News for hackers. Stuff that matters.
Re:Concurrent Memory Deallocation in the Objective-C Runtime by pron on Saturday June 06, 2015 @03:19PM (#9671891)
That's a cool GC algorithm, but it has two big drawbacks:

1. It works well only if the number of GCed data structures -- i.e. the number of entry/exit points -- is relatively small (in this case, just the method cache).

2. It prevents inlining of the data structure's access functions, which adds quite a bit of overhead to each access (though not as much as two fenced CASes).

It can, however, be very useful for hot code swapping (provided there's no inlining or you have a JIT that can un-inline).

Re:Concurrent Memory Deallocation in the Objective-C Runtime by pcwalton on Saturday June 06, 2015 @03:23PM (#9671901)
I think the way to look at this is more of as a synchronization technique as opposed to a general-purpose GC algorithm.

I don't understand the objection about inlining--could you explain? You could in principle not use function boundaries to delimit the critical section: a range of PC addresses within a function would do just as well.

Re:Concurrent Memory Deallocation in the Objective-C Runtime by pron on Saturday June 06, 2015 @03:47PM (#9671980)
> a range of PC addresses within a function would do just as well

Yes, but you'll need to know where those ranges are (i.e. you'll need some feedback from the compiler), and then be very careful that no tool injects any instructions into, or moves code around your executable/library.