xo-alloc: reserve virtual memory, commit pages on demand
This commit is contained in:
parent
bd00826448
commit
312f7e58c7
8 changed files with 140 additions and 23 deletions
|
|
@ -115,7 +115,16 @@ namespace xo {
|
|||
std::size_t
|
||||
GC::size() const
|
||||
{
|
||||
return nursery_[role2int(role::to_space)]->size() + tenured_[role2int(role::to_space)]->size();
|
||||
return nursery_to()->size() + tenured_to()->size();
|
||||
}
|
||||
|
||||
std::size_t
|
||||
GC::committed() const
|
||||
{
|
||||
return (nursery_to()->committed()
|
||||
+ nursery_from()->committed()
|
||||
+ tenured_to()->committed()
|
||||
+ tenured_from()->committed());
|
||||
}
|
||||
|
||||
std::size_t
|
||||
|
|
@ -182,6 +191,12 @@ namespace xo {
|
|||
return retval;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
GC::nursery_to_committed() const
|
||||
{
|
||||
return nursery_to()->committed();
|
||||
}
|
||||
|
||||
generation_result
|
||||
GC::fromspace_generation_of(const void * x) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue