diff options
author | user <user@localhost.localdomain> | 2019-12-09 15:01:24 -0800 |
---|---|---|
committer | user <user@localhost.localdomain> | 2019-12-09 15:01:24 -0800 |
commit | 3e3aeddec840fed915b0fa748dcd2f56d6f682ef (patch) | |
tree | 1d672499211330185c0f67be737d3910141c41b1 /starts/meaning-vm/level-1/memorystore.cpp | |
parent | 0e40f5829a880ba63a3a8603e4babf2c2f7659e5 (diff) | |
download | standingwithresilience-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.cpp | 33 |
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(); + +} +} |