| 62 | |
| 63 | |
| 64 | void run() { |
| 65 | // Initialize. |
| 66 | std::cout << "Initializing..." << std::endl; |
| 67 | auto engine = wasm::Engine::make(); |
| 68 | |
| 69 | std::cout << "Live count " << live_count << std::endl; |
| 70 | std::cout << "Creating store 1..." << std::endl; |
| 71 | auto store1 = wasm::Store::make(engine.get()); |
| 72 | |
| 73 | std::cout << "Running in store 1..." << std::endl; |
| 74 | run_in_store(store1.get()); |
| 75 | std::cout << "Live count " << live_count << std::endl; |
| 76 | |
| 77 | { |
| 78 | std::cout << "Creating store 2..." << std::endl; |
| 79 | auto store2 = wasm::Store::make(engine.get()); |
| 80 | |
| 81 | std::cout << "Running in store 2..." << std::endl; |
| 82 | run_in_store(store2.get()); |
| 83 | std::cout << "Live count " << live_count << std::endl; |
| 84 | |
| 85 | std::cout << "Deleting store 2..." << std::endl; |
| 86 | std::cout << "Live count " << live_count << std::endl; |
| 87 | } |
| 88 | |
| 89 | std::cout << "Running in store 1..." << std::endl; |
| 90 | run_in_store(store1.get()); |
| 91 | std::cout << "Live count " << live_count << std::endl; |
| 92 | |
| 93 | std::cout << "Deleting store 1..." << std::endl; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | int main(int argc, const char* argv[]) { |
no test coverage detected