简体   繁体   中英

Mark phase misdetection on garbage collection for C

I've looked at Conservative GC Algorithmic Overview

Can a misdetection happen in the 'marking' part? If some data is stored and by coincidence happen to be the same as an address of an allocated memory, will the collector keep the memory ?

Yes, that's why it is called conservative. Every integer that looks like it points inside the heap will make the region non-garbage. And as a result, a memory leak may occur.

Yes.

That's why it's called "conservative", I think.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM