From 3e3aeddec840fed915b0fa748dcd2f56d6f682ef Mon Sep 17 00:00:00 2001 From: user Date: Mon, 9 Dec 2019 15:01:24 -0800 Subject: wip level1 allocation groups --- starts/meaning-vm/level-1/memorystore.cpp | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 starts/meaning-vm/level-1/memorystore.cpp (limited to 'starts/meaning-vm/level-1/memorystore.cpp') diff --git a/starts/meaning-vm/level-1/memorystore.cpp b/starts/meaning-vm/level-1/memorystore.cpp new file mode 100644 index 0000000..0bd109b --- /dev/null +++ b/starts/meaning-vm/level-1/memorystore.cpp @@ -0,0 +1,33 @@ +#include "memorystore.hpp" + +#include "concepts.hpp" + +#include "../level-0/memorystore.hpp" + +namespace intellect { +namespace level1 { + +ref allocation_group("allocation-group"); +ref allocation_part("allocation-part"); + +ref alloc(ref grp, std::any data) +{ + ref res = level0::alloc(data); + keep(res, grp); +} + +void keep(ref allocated, ref grp) +{ + allocated.link(allocation_group, grp); + grp.link(allocation_part, allocated); +} + +void dealloc(ref grp, ref metagroup) +{ + +//} + +std::size_t allocatedgroups(); + +} +} -- cgit v1.2.3