xo-alloc, xo-object: fix alloc,gc unit tests after gc improvements
This commit is contained in:
parent
daf729292e
commit
2febec3c8c
9 changed files with 44 additions and 17 deletions
|
|
@ -130,6 +130,7 @@ namespace xo {
|
|||
std::size_t reserved() const { return hi_ - lo_; };
|
||||
|
||||
std::size_t page_size() const { return page_z_; }
|
||||
std::size_t hugepage_z() const { return hugepage_z_; }
|
||||
std::byte * free_ptr() const { return free_ptr_; }
|
||||
void set_free_ptr(std::byte * x);
|
||||
|
||||
|
|
|
|||
|
|
@ -177,6 +177,8 @@ namespace xo {
|
|||
|
||||
/** @return pagesize (will be the same for {nursery, tenured} spaces) **/
|
||||
std::size_t pagesize() const;
|
||||
/** @return hugepage size (will be the same for {nursery, tenured} spaces) **/
|
||||
std::size_t hugepage_z() const;
|
||||
|
||||
/** @return allocation portion of Nursery to-space **/
|
||||
std::size_t nursery_to_allocated() const;
|
||||
|
|
|
|||
|
|
@ -16,12 +16,15 @@ namespace xo {
|
|||
|
||||
namespace gc {
|
||||
/** @class IAllocator
|
||||
* @brief memory allocation interface with limited garbage collector support
|
||||
* @brief arena allocation interface with limited garbage collector support
|
||||
*
|
||||
* Garbage collector support methods:
|
||||
* - checkpoint()
|
||||
* - assign_member()
|
||||
* - alloc_gc_copy()
|
||||
*
|
||||
* See class GC for copying incremental collector.
|
||||
* See class ArenaAlloc for arena allocator
|
||||
**/
|
||||
class IAlloc {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ namespace xo {
|
|||
/** page size used by underlying ArenaAlloc **/
|
||||
std::size_t page_size() const;
|
||||
|
||||
/** hugepage size used by underlying ArenaAlloc **/
|
||||
std::size_t hugepage_z() const;
|
||||
|
||||
/** reset to have at least @p z bytes of storage **/
|
||||
bool reset(std::size_t z);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue