shaoyihe
shaoyihe

Reputation: 1087

What's the difference of mark-sweep-compact vs mark-compact?

if gc use mark-sweep-compact algorithm, why need sweep while compact memory, because compact already remain continuous space?

Upvotes: 0

Views: 945

Answers (1)

shaoyihe
shaoyihe

Reputation: 1087

There is no mark-sweep-compact algorithm , only have mark-sweep and mark-compact; but sometimes you can combine both at different stage , eg : cms collector .

Upvotes: 1

Related Questions