/* Sun-$Revision: 23.2 $ */
/* Copyright 1992-9 Sun Microsystems, Inc. and Stanford University.
See the LICENSE file for license information. */
# pragma interface
// Age table for feedback-mediated tenuring (generation scavenging).
const int32 age_table_size = age_mask + 1;
struct ageTable: CHeapObj {
// instance variables
int32 sizes[age_table_size];
// constructor
ageTable();
// operations
void clear() { set_oops((oop*) &sizes[0], age_table_size, NULL); }
void add(memOop p) {
int32 age = p->mark()->age();
assert(age >= 0 && age < age_table_size, "invalid age of object");
sizes[age] += p->size(); }
int32 tenure_size(fint age);
fint tenuring_threshold(int32 size);
};