diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-12-12 07:38:19 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-12-12 07:38:19 -0800 |
commit | df58c6cd5c26120a985cca74243fc7978457ff2e (patch) | |
tree | 0a61ca17a83dc3484c9a2b1c69c83b64849d958f /starts/meaning-vm/level1.cpp | |
parent | 931c924ed0b23fea8179644e5f7f1da866c7c07e (diff) | |
download | standingwithresilience-df58c6cd5c26120a985cca74243fc7978457ff2e.tar.gz standingwithresilience-df58c6cd5c26120a985cca74243fc7978457ff2e.zip |
tried to use allocations with level1 ... messy, works, for some reason name of function is output in dump, shows internal problem
Diffstat (limited to 'starts/meaning-vm/level1.cpp')
-rw-r--r-- | starts/meaning-vm/level1.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/starts/meaning-vm/level1.cpp b/starts/meaning-vm/level1.cpp index 50c40a3..628fc1e 100644 --- a/starts/meaning-vm/level1.cpp +++ b/starts/meaning-vm/level1.cpp @@ -9,6 +9,8 @@ int main() { std::cout << intellect::level0::allocated() << " allocated" << std::endl; + ///* + decls(make, linked, habit); std::cout << intellect::level0::allocated() << " allocated" << std::endl; decls(needs, assumes, makes); @@ -68,10 +70,12 @@ int main() while (true) { try { intellect::level0::dealloc(intellect::level0::concepts::allocations(), intellect::level0::concepts::level0allocations()); + break; } catch (intellect::level0::still_referenced_by &e) { if (e.topic->linked(intellect::level0::concepts::allocates(), e.referrer)) { - intellect::level0::dealloc(e.referrer, e.topic); + intellect::level0::realloc(e.referrer, intellect::level0::concepts::allocations()); } else { + std::cout << "In deallocation, " << ref(e.topic).name() << " still referenced by " << ref(e.referrer).name() << std::endl; throw; } } |