首页>
外国专利>
Reference counting mechanism for garbage collectors
Reference counting mechanism for garbage collectors
展开▼
机译:垃圾收集器的引用计数机制
展开▼
页面导航
摘要
著录项
相似文献
摘要
A method of garbage collection and data processing apparatus embodying the same. Within a heap memory, data objects are accessed via respective pointers carried by memory stacks; the memory is periodically swept to mark, for each object, a count of the number of extant pointers thereto from any source and, on detection that an object's count has reached zero, deleting that object. To permit concurrency of mark and sweep operations, a pair of reference count fields are maintained for each object: one holds an ongoing pointer count for the present mark operation and the other holds the value for the preceding one. At the conclusion of each mark operation, the mapping of counts into fields is reversed. An objects count is taken as zero, and the object deleted, when both counts are zero.
展开▼