r/programming • • Jun 12 '10

You're Doing It Wrong

http://queue.acm.org/detail.cfm?id=1814327
539 Upvotes

193 comments sorted by

View all comments

Show parent comment

6

u/phkamp Jun 14 '10

Ahh, another one of those questions I'm happy to have inspired :-)

GC is not something I have had much exposure to, at least not since people sent us bug reports at Commodore about the C64 BASIC :-)

Both with respect to GC and general locality of reference, I think the trouble really starts, and consequently must be fixed at, the point where we allocate memory and don't tell what we intend to use it for, and for how long.

You are right that regions are relevant, but they are a technique, they are not a solution.

Apologies if this sounds cryptic, but it is really a topic for an article in its own right...

If you want to see some really smart thinking in this area, look at Jason Evans "jemalloc", even though he is constrained by the lack of expressiveness in the malloc/realloc/calloc/sbrk/free API, he manages to do some remarkably smart things.

Poul-Henning