Log in to comment.
A garbage collector’s responsibility is to maintain a memory allocator and an accounting of:
What memory has been allocated. Whether that memory is still in use.
Memory that is not in use can be reclaimed and marked as unallocated, for re-use.
Don’t think that’s all that a garbage collector does.
Memory that is not in use can be reclaimed and marked as unallocated, for re-use.
Don’t think that’s all that a garbage collector does.