Hacker News new | past | comments | ask | show | jobs | submit login

I've investigated this for an industrial-strength, large-scale project in the past. It's technologically interesting; to collect, it "stops the world" (freezing all threads but one using, e.g., POSIX signals) and then uses the CPU registers, each thread's stack, and global variables as "roots" to be traversed to find live objects. In a way, this is even more general than just C or C++; it really works for any static language, including assembly. One caveat is that if your code represents pointers in non-obvious ways, the objects referred to will look like garbage to this collector. I'm afraid it's not as unusual as one might hope for low-level code to represent pointers in funny ways...



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: