Yoinked newer GC.
This commit is contained in:
parent
3377879dd0
commit
0452a30409
15 changed files with 713 additions and 189 deletions
|
|
@ -9,22 +9,8 @@ struct Obj {
|
|||
};
|
||||
|
||||
int main() {
|
||||
auto heap = GC::Heap::debug_the();
|
||||
|
||||
std::cout << "heap:\t" << heap << std::endl;
|
||||
|
||||
auto obj = static_cast<Obj *>(GC::Heap::alloc(sizeof(Obj)));
|
||||
|
||||
std::cout << "obj: \t" << obj << std::endl;
|
||||
|
||||
obj->a = 3;
|
||||
obj->b = 4;
|
||||
obj->c = 5;
|
||||
|
||||
std::cout << obj->a << ", " << obj->b << ", " << obj->c << std::endl;
|
||||
|
||||
heap->print_contents();
|
||||
//delete heap;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue