xo-object2: utest: ++ allocation in collector utest
This commit is contained in:
parent
f8df25537e
commit
25a85b71d3
4 changed files with 17 additions and 0 deletions
|
|
@ -237,6 +237,11 @@ namespace xo {
|
|||
* New allocs always in gen0 to-space
|
||||
**/
|
||||
value_type sub_alloc(size_type z, bool complete) noexcept;
|
||||
/** Allocate copy of source object at @p src.
|
||||
* Source must be owned by this collector instance.
|
||||
* Copy will have incremented age.
|
||||
**/
|
||||
value_type alloc_copy(value_type src) noexcept;
|
||||
/** expand gen0 committed size to at least @p z.
|
||||
**/
|
||||
bool expand(size_type z) noexcept;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ namespace xo {
|
|||
static value_type alloc(DX1Collector & d, typeseq t, size_type z) noexcept;
|
||||
static value_type super_alloc(DX1Collector & d, typeseq t, size_type z) noexcept;
|
||||
static value_type sub_alloc(DX1Collector & d, size_type z, bool complete) noexcept;
|
||||
static value_type alloc_copy(DX1Collector & d, value_type src) noexcept;
|
||||
/** expand gen0 spaces (both from-space and to-space) **/
|
||||
static bool expand(DX1Collector & d, size_type z) noexcept;
|
||||
|
||||
|
|
|
|||
|
|
@ -231,6 +231,11 @@ namespace xo {
|
|||
return with_facet<AAllocator>::mkobj(new_space()).sub_alloc(z, complete);
|
||||
}
|
||||
|
||||
auto
|
||||
DX1Collector::alloc_copy(value_type src) noexcept -> value_type {
|
||||
return with_facet<AAllocator>::mkobj(new_space()).alloc_copy(src);
|
||||
}
|
||||
|
||||
bool
|
||||
DX1Collector::expand(size_type z) noexcept
|
||||
{
|
||||
|
|
|
|||
|
|
@ -102,6 +102,12 @@ namespace xo {
|
|||
return d.sub_alloc(z, complete);
|
||||
}
|
||||
|
||||
auto
|
||||
IAllocator_DX1Collector::alloc_copy(DX1Collector & d, value_type src) noexcept -> value_type
|
||||
{
|
||||
return d.alloc_copy(src);
|
||||
}
|
||||
|
||||
bool
|
||||
IAllocator_DX1Collector::expand(DX1Collector & d, size_type z) noexcept
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue