xo-gc: cosmetic: rename xo::mm::role -> xo::mm::Role
This commit is contained in:
parent
006c1830b3
commit
268e474cfd
12 changed files with 116 additions and 116 deletions
|
|
@ -118,34 +118,34 @@ namespace xo {
|
|||
GCRunState runstate() const noexcept { return runstate_; }
|
||||
const ObjectTypeTable * get_object_types() const noexcept { return gco_store_.get_object_types(); }
|
||||
const RootSet * get_root_set() const noexcept { return &root_set_; }
|
||||
const DArena * get_space(role r, Generation g) const noexcept { return gco_store_.get_space(r, g); }
|
||||
DArena * get_space(role r, Generation g) noexcept { return gco_store_.get_space(r, g); }
|
||||
DArena * from_space(Generation g) noexcept { return this->get_space(role::from_space(), g); }
|
||||
DArena * to_space(Generation g) noexcept { return this->get_space(role::to_space(), g); }
|
||||
const DArena * get_space(Role r, Generation g) const noexcept { return gco_store_.get_space(r, g); }
|
||||
DArena * get_space(Role r, Generation g) noexcept { return gco_store_.get_space(r, g); }
|
||||
DArena * from_space(Generation g) noexcept { return this->get_space(Role::from_space(), g); }
|
||||
DArena * to_space(Generation g) noexcept { return this->get_space(Role::to_space(), g); }
|
||||
DArena * new_space() noexcept { return this->to_space(Generation{0}); }
|
||||
|
||||
// ----- basic statistics -----
|
||||
|
||||
/** total reserved memory in bytes, across all {role, generation} **/
|
||||
/** total reserved memory in bytes, across all {Role, generation} **/
|
||||
size_type reserved() const noexcept;
|
||||
/** total size in bytes (same as committed_total()) **/
|
||||
size_type size_total() const noexcept;
|
||||
/** total committed memory in bytes, across all {role, generation} **/
|
||||
/** total committed memory in bytes, across all {Role, generation} **/
|
||||
size_type committed() const noexcept;
|
||||
/** total available memory in bytes, across all {role, generation} **/
|
||||
/** total available memory in bytes, across all {Role, generation} **/
|
||||
size_type available() const noexcept;
|
||||
/** total allocated memory in bytes, across all {role, generation} **/
|
||||
/** total allocated memory in bytes, across all {Role, generation} **/
|
||||
size_type allocated() const noexcept;
|
||||
|
||||
/** total number of mutation log entries **/
|
||||
size_type mutation_log_entries() const noexcept;
|
||||
|
||||
/** memory allocated for generation @p g in role @p r **/
|
||||
size_type allocated(Generation g, role r) const noexcept;
|
||||
/** memory committed for generation @p g in role @p r **/
|
||||
size_type committed(Generation g, role r) const noexcept;
|
||||
/** memory (virtual addresses) reserved for generation @p g in role @p r **/
|
||||
size_type reserved(Generation g, role r) const noexcept;
|
||||
/** memory allocated for generation @p g in Role @p r **/
|
||||
size_type allocated(Generation g, Role r) const noexcept;
|
||||
/** memory committed for generation @p g in Role @p r **/
|
||||
size_type committed(Generation g, Role r) const noexcept;
|
||||
/** memory (virtual addresses) reserved for generation @p g in Role @p r **/
|
||||
size_type reserved(Generation g, Role r) const noexcept;
|
||||
|
||||
/** very similar to generation_of(), but satisfies ACollector api **/
|
||||
std::int32_t locate_address(const void * addr) const noexcept;
|
||||
|
|
@ -197,21 +197,21 @@ namespace xo {
|
|||
void visit_pools(const MemorySizeVisitor & visitor) const;
|
||||
|
||||
/** true iff address @p addr allocated from this collector
|
||||
* in role @p r (according to current GC state)
|
||||
* in Role @p r (according to current GC state)
|
||||
**/
|
||||
bool contains(role r, const void * addr) const noexcept;
|
||||
bool contains(Role r, const void * addr) const noexcept;
|
||||
|
||||
/** true iff address @p addr allocated from this collector and currently live
|
||||
* in role @p r (according to current GC state)
|
||||
* in Role @p r (according to current GC state)
|
||||
*
|
||||
* (i.e. in [lo,free) for an arena)
|
||||
**/
|
||||
bool contains_allocated(role r, const void * addr) const noexcept;
|
||||
bool contains_allocated(Role r, const void * addr) const noexcept;
|
||||
|
||||
/** generation to which pointer @p addr belongs, given role @p r;
|
||||
/** generation to which pointer @p addr belongs, given Role @p r;
|
||||
* sentinel if not found in this collector
|
||||
**/
|
||||
Generation generation_of(role r, const void * addr) const noexcept;
|
||||
Generation generation_of(Role r, const void * addr) const noexcept;
|
||||
|
||||
/** return details from last error (will be in gen0 to-space) **/
|
||||
AllocError last_error() const noexcept;
|
||||
|
|
@ -352,7 +352,7 @@ namespace xo {
|
|||
/** aux init function: initialize @ref space_storage_[][] arenas **/
|
||||
void _init_space(const X1CollectorConfig & cfg);
|
||||
|
||||
/** swap from- and to- roles for all generations < @p upto **/
|
||||
/** swap from- and to- Roles for all generations < @p upto **/
|
||||
void _swap_roles(Generation upto) noexcept;
|
||||
/** copy roots + everything reachable from them, to to-space **/
|
||||
void _copy_roots(Generation upto) noexcept;
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ namespace xo {
|
|||
const GCObjectStoreConfig & config() const noexcept { return config_; }
|
||||
|
||||
const ObjectTypeTable * get_object_types() const noexcept { return &object_types_; }
|
||||
const DArena * get_space(role r, Generation g) const noexcept { return space_[r][g]; }
|
||||
DArena * get_space(role r, Generation g) noexcept { return space_[r][g]; }
|
||||
DArena * from_space(Generation g) noexcept { return get_space(role::from_space(), g); }
|
||||
DArena * to_space(Generation g) noexcept { return get_space(role::to_space(), g); }
|
||||
const DArena * get_space(Role r, Generation g) const noexcept { return space_[r][g]; }
|
||||
DArena * get_space(Role r, Generation g) noexcept { return space_[r][g]; }
|
||||
DArena * from_space(Generation g) noexcept { return get_space(Role::from_space(), g); }
|
||||
DArena * to_space(Generation g) noexcept { return get_space(Role::to_space(), g); }
|
||||
DArena * new_space() noexcept { return to_space(Generation{0}); }
|
||||
|
||||
/** true iff type with id @p tseq has known metadata
|
||||
|
|
@ -50,10 +50,10 @@ namespace xo {
|
|||
**/
|
||||
AGCObject * lookup_type(typeseq tseq) const noexcept;
|
||||
|
||||
/** generation to which pointer @p addr belongs, given role @p r;
|
||||
/** generation to which pointer @p addr belongs, given Role @p r;
|
||||
* sentinel if not found in this collector
|
||||
**/
|
||||
Generation generation_of(role r, const void * addr) const noexcept;
|
||||
Generation generation_of(Role r, const void * addr) const noexcept;
|
||||
|
||||
/** get allocation size from header **/
|
||||
std::size_t header2size(header_type hdr) const noexcept;
|
||||
|
|
@ -72,16 +72,16 @@ namespace xo {
|
|||
void visit_pools(const MemorySizeVisitor & visitor) const;
|
||||
|
||||
/** true iff address @p addr allocated from this collector
|
||||
* in role @p r (according to current GC state)
|
||||
* in Role @p r (according to current GC state)
|
||||
**/
|
||||
bool contains(role r, const void * addr) const noexcept;
|
||||
bool contains(Role r, const void * addr) const noexcept;
|
||||
|
||||
/** true iff address @p addr allocated from this collector and currently live
|
||||
* in role @p r (according to current GC state)
|
||||
* in Role @p r (according to current GC state)
|
||||
*
|
||||
* (i.e. in [lo,free) for an arena)
|
||||
**/
|
||||
bool contains_allocated(role r, const void * addr) const noexcept;
|
||||
bool contains_allocated(Role r, const void * addr) const noexcept;
|
||||
|
||||
/** Report per-age-bucket information as an array of dictionaries.
|
||||
* Scans to-space to count per-age statistics.
|
||||
|
|
|
|||
|
|
@ -48,17 +48,17 @@ namespace xo {
|
|||
///@{
|
||||
// const methods
|
||||
/** memory in use for this collector **/
|
||||
static size_type allocated(const DX1Collector & self, Generation g, role r) noexcept;
|
||||
static size_type allocated(const DX1Collector & self, Generation g, Role r) noexcept;
|
||||
/** memory committed for this collector **/
|
||||
static size_type committed(const DX1Collector & self, Generation g, role r) noexcept;
|
||||
static size_type committed(const DX1Collector & self, Generation g, Role r) noexcept;
|
||||
/** address space reserved for this collector **/
|
||||
static size_type reserved(const DX1Collector & self, Generation g, role r) noexcept;
|
||||
static size_type reserved(const DX1Collector & self, Generation g, Role r) noexcept;
|
||||
/** Location of object in collector. -1 if not in collector memory.
|
||||
Other negative values represent collector error states (good luck!).
|
||||
Exact meaning of non-negative values up to collector implementation **/
|
||||
static std::int32_t locate_address(const DX1Collector & self, const void * addr) noexcept;
|
||||
/** true if gc responsible for data at @p addr, and data belongs to role @p r **/
|
||||
static bool contains(const DX1Collector & self, role r, const void * addr) noexcept;
|
||||
/** true if gc responsible for data at @p addr, and data belongs to Role @p r **/
|
||||
static bool contains(const DX1Collector & self, Role r, const void * addr) noexcept;
|
||||
/** true iff gc-aware object of type @p tseq is installed in this collector **/
|
||||
static bool is_type_installed(const DX1Collector & self, typeseq tseq) noexcept;
|
||||
/** Report gc statistics, at discretion of collector implementation.
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace xo {
|
|||
static AllocInfo alloc_info(const DX1Collector & self, void * addr);
|
||||
/** generation to which pointer @p addr belongs, given role @p r;
|
||||
sentinel if @p addr is not owned by collector **/
|
||||
static Generation generation_of(const DX1Collector & self, role r, const void * addr) noexcept;
|
||||
static Generation generation_of(const DX1Collector & self, Role r, const void * addr) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** allocate copy of source object at address @p src.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue