Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If it interrupts your running code, it only can happen at moments when you allocate memory, just like with malloc. You cannot predict when malloc calls brk(), either.

Also, most OS-es are non-deterministic, anyways. You cannot predict whether your code lives in cache/main memory, or on disk. In some systems, your data even might have to be brought in by a tape robot without your code being aware of it. As soon as a garbage collector manages to get its interruptions to be about equal to delays caused by caching and virtual memory, I doubt many people will care.



I'm not talking about interruptions on allocations, but deallocations.

You never know when GC fires - starts harvesting for memory locations that need to be freed and frees them.


With Gargage collection, there are ni deallocations.

Also, garbage collection does not "harvest for memory locations that need to be freed and frees them.". Garbage collection does not collect garbage, it collects used space.


I think you're misinformed.

Here are some more details if you're interested:

http://en.wikipedia.org/wiki/Garbage_collection_(computer_sc...




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

Search: