xo-gc: X1Collector.assign_member() + GCRoots + use ArenaVector
Using ArenaVector for mlog.
This commit is contained in:
parent
2c2332c0a9
commit
6dc2bf1e93
10 changed files with 558 additions and 115 deletions
|
|
@ -63,10 +63,14 @@ namespace xo {
|
|||
16 /*size_bits*/), };
|
||||
X1CollectorConfig cfg = { .arena_config_ = arena_cfg,
|
||||
.n_generation_ = 2,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024, 0, 0,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024,
|
||||
#ifdef NOPE
|
||||
0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0}} };
|
||||
0, 0, 0, 0
|
||||
#endif
|
||||
}} };
|
||||
|
||||
DX1Collector gc = DX1Collector{cfg};
|
||||
|
||||
|
|
@ -111,10 +115,14 @@ namespace xo {
|
|||
16 /*size_bits*/), };
|
||||
X1CollectorConfig cfg = { .arena_config_ = arena_cfg,
|
||||
.n_generation_ = 2,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024, 0, 0,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024,
|
||||
#ifdef NOPE
|
||||
0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0}} };
|
||||
0, 0, 0, 0
|
||||
#endif
|
||||
}} };
|
||||
|
||||
DX1Collector gc = DX1Collector{cfg};
|
||||
|
||||
|
|
@ -137,10 +145,14 @@ namespace xo {
|
|||
16 /*size-bits*/), };
|
||||
X1CollectorConfig cfg = { .arena_config_ = arena_cfg,
|
||||
.n_generation_ = 2,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024, 0, 0,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024,
|
||||
#ifdef NOPE
|
||||
0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0}} };
|
||||
0, 0, 0, 0
|
||||
#endif
|
||||
}} };
|
||||
|
||||
DX1Collector gc = DX1Collector{cfg};
|
||||
|
||||
|
|
@ -167,10 +179,14 @@ namespace xo {
|
|||
/* collector with one generation collapses to a non-generational copying collector */
|
||||
X1CollectorConfig cfg = { .arena_config_ = arena_cfg,
|
||||
.n_generation_ = 1,
|
||||
.gc_trigger_v_ = {{64*1024, 0, 0, 0,
|
||||
.gc_trigger_v_ = {{64*1024, 0,
|
||||
#ifdef NOPE
|
||||
0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0}} };
|
||||
0, 0, 0, 0
|
||||
#endif
|
||||
}} };
|
||||
|
||||
DX1Collector x1state = DX1Collector{cfg};
|
||||
|
||||
|
|
@ -211,10 +227,14 @@ namespace xo {
|
|||
/* collector with one generation collapses to a non-generational copying collector */
|
||||
X1CollectorConfig cfg = { .arena_config_ = arena_cfg,
|
||||
.n_generation_ = 1,
|
||||
.gc_trigger_v_ = {{64*1024, 0, 0, 0,
|
||||
.gc_trigger_v_ = {{64*1024, 0,
|
||||
#ifdef NOPE
|
||||
0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0}} };
|
||||
0, 0, 0, 0
|
||||
#endif
|
||||
}} };
|
||||
|
||||
/* X1 allocator+collector */
|
||||
DX1Collector x1state = DX1Collector{cfg};
|
||||
|
|
|
|||
|
|
@ -53,10 +53,14 @@ namespace xo {
|
|||
16 /*size_bits*/), };
|
||||
X1CollectorConfig cfg = { .arena_config_ = arena_cfg,
|
||||
.n_generation_ = 2,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024, 0, 0,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024,
|
||||
#ifdef NOPE
|
||||
0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0}} };
|
||||
0, 0, 0, 0
|
||||
#endif
|
||||
}} };
|
||||
|
||||
DX1Collector gc = DX1Collector{cfg};
|
||||
|
||||
|
|
@ -96,10 +100,14 @@ namespace xo {
|
|||
16 /*size_bits*/), };
|
||||
X1CollectorConfig cfg = { .arena_config_ = arena_cfg,
|
||||
.n_generation_ = 2,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024, 0, 0,
|
||||
.gc_trigger_v_ = {{64*1024, 1024*1024,
|
||||
#ifdef NOPE
|
||||
0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0}} };
|
||||
0, 0, 0, 0
|
||||
#endif
|
||||
}} };
|
||||
|
||||
DX1Collector gc = DX1Collector{cfg};
|
||||
obj<AAllocator, DX1Collector> a1o{&gc};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue