xo-object: improve GC unittest + prep to integrate w/ xo::reflect
This commit is contained in:
parent
ff5b0cfb8a
commit
432e0efce2
8 changed files with 305 additions and 120 deletions
26
include/xo/alloc/generation.hpp
Normal file
26
include/xo/alloc/generation.hpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* generation.hpp
|
||||
*
|
||||
* author: Roland Conybeare, Aug 2025
|
||||
*/
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace xo {
|
||||
namespace gc {
|
||||
enum class generation {
|
||||
nursery,
|
||||
tenured,
|
||||
N
|
||||
};
|
||||
|
||||
constexpr std::size_t gen2int(generation x) { return static_cast<std::size_t>(x); }
|
||||
|
||||
enum class generation_result {
|
||||
nursery,
|
||||
tenured,
|
||||
not_found
|
||||
};
|
||||
} /*namespace gc*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end generation.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue