summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-1/memorystore.cpp
diff options
context:
space:
mode:
authoruser <user@localhost.localdomain>2019-12-09 15:01:24 -0800
committeruser <user@localhost.localdomain>2019-12-09 15:01:24 -0800
commit3e3aeddec840fed915b0fa748dcd2f56d6f682ef (patch)
tree1d672499211330185c0f67be737d3910141c41b1 /starts/meaning-vm/level-1/memorystore.cpp
parent0e40f5829a880ba63a3a8603e4babf2c2f7659e5 (diff)
downloadstandingwithresilience-3e3aeddec840fed915b0fa748dcd2f56d6f682ef.tar.gz
standingwithresilience-3e3aeddec840fed915b0fa748dcd2f56d6f682ef.zip
wip level1 allocation groups
Diffstat (limited to 'starts/meaning-vm/level-1/memorystore.cpp')
-rw-r--r--starts/meaning-vm/level-1/memorystore.cpp33
1 files changed, 33 insertions, 0 deletions
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();
+
+}
+}