feat(furvm): add collect function to context

This commit is contained in:
2026-06-10 20:35:05 +02:00
parent 4d935ef75f
commit 9021ae0089
3 changed files with 18 additions and 0 deletions
+4
View File
@@ -25,8 +25,12 @@ int main(void) {
auto executor = furvm::executor::create(context);
executor->push_frame(mainModule, 0);
static constexpr std::size_t FPC = 3; // Frames per collection
std::size_t count = 0;
while ((executor->flags() & furvm::executor_flags::Done) != furvm::executor_flags::Done) {
executor->step();
if ((++count % FPC) == 0) context->collect();
}
return 0;