xo-reader2 stack: + TypeRegistry
This commit is contained in:
parent
b8d1492265
commit
94514bf04f
3 changed files with 9 additions and 7 deletions
|
|
@ -16,8 +16,10 @@ namespace xo {
|
|||
using size_type = std::size_t;
|
||||
|
||||
MemorySizeInfo() = default;
|
||||
MemorySizeInfo(std::string_view name, std::size_t u, std::size_t a, std::size_t c, std::size_t r)
|
||||
: resource_name_{name}, used_{u}, allocated_{a}, committed_{c}, reserved_{r}
|
||||
MemorySizeInfo(std::string_view name,
|
||||
std::size_t u, std::size_t a, std::size_t c, std::size_t r)
|
||||
: resource_name_{name},
|
||||
used_{u}, allocated_{a}, committed_{c}, reserved_{r}
|
||||
{}
|
||||
|
||||
static MemorySizeInfo sentinel() { return MemorySizeInfo(); }
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace xo {
|
|||
|
||||
DArena::DArena(const ArenaConfig & cfg)
|
||||
{
|
||||
*this = std::move(map(cfg));
|
||||
*this = map(cfg);
|
||||
}
|
||||
|
||||
DArena::DArena(const ArenaConfig & cfg,
|
||||
|
|
@ -290,7 +290,7 @@ namespace xo {
|
|||
(complete_flag
|
||||
? alloc_mode::sub_complete
|
||||
: alloc_mode::sub_incomplete),
|
||||
typeseq::anon() /*typeseq: ignored*/,
|
||||
typeseq::sentinel() /*typeseq: ignored*/,
|
||||
0 /*age - ignored */);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ namespace xo {
|
|||
REQUIRE(arena.allocated() == 0);
|
||||
|
||||
size_t z0 = 1;
|
||||
byte * m0 = arena.alloc(typeseq::anon(), 1);
|
||||
byte * m0 = arena.alloc(typeseq::sentinel(), 1);
|
||||
|
||||
REQUIRE(m0);
|
||||
REQUIRE(arena.last_error().error_ == error::ok);
|
||||
|
|
@ -159,7 +159,7 @@ namespace xo {
|
|||
REQUIRE(arena.committed() <= arena.reserved());
|
||||
|
||||
size_t z1 = 16;
|
||||
byte * m1 = arena.alloc(typeseq::anon(), z1);
|
||||
byte * m1 = arena.alloc(typeseq::sentinel(), z1);
|
||||
|
||||
REQUIRE(m1);
|
||||
REQUIRE(arena.last_error().error_ == error::ok);
|
||||
|
|
@ -195,7 +195,7 @@ namespace xo {
|
|||
REQUIRE(arena.allocated() == 0);
|
||||
|
||||
size_t z0 = 1;
|
||||
byte * m0 = arena.alloc(typeseq::anon(), 1);
|
||||
byte * m0 = arena.alloc(typeseq::sentinel(), 1);
|
||||
|
||||
REQUIRE(m0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue