2009-10-07 16:48:09 -04:00
|
|
|
namespace factor
|
|
|
|
{
|
|
|
|
|
|
|
|
struct aging_policy {
|
2009-10-18 21:31:59 -04:00
|
|
|
factor_vm *parent;
|
2009-10-07 16:48:09 -04:00
|
|
|
zone *aging, *tenured;
|
|
|
|
|
2009-10-18 21:31:59 -04:00
|
|
|
aging_policy(factor_vm *parent_) :
|
|
|
|
parent(parent_),
|
|
|
|
aging(parent->data->aging),
|
|
|
|
tenured(parent->data->tenured) {}
|
2009-10-07 16:48:09 -04:00
|
|
|
|
|
|
|
bool should_copy_p(object *untagged)
|
|
|
|
{
|
|
|
|
return !(aging->contains_p(untagged) || tenured->contains_p(untagged));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct aging_collector : copying_collector<aging_space,aging_policy> {
|
2009-10-18 21:31:59 -04:00
|
|
|
aging_collector(factor_vm *parent_);
|
2009-10-07 16:48:09 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|