Skip to content

Commit d03fcad

Browse files
committed
test
1 parent 19500d3 commit d03fcad

File tree

2 files changed

+7
-36
lines changed

2 files changed

+7
-36
lines changed

product-mini/platforms/posix/main.c

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ print_help(void)
6565
printf(" --gc-heap-size=n Set maximum gc heap size in bytes,\n");
6666
printf(" default is %u KB\n", GC_HEAP_SIZE_DEFAULT / 1024);
6767
#endif
68-
#if WASM_ENABLE_SHARED_HEAP != 0
69-
printf(" --shared-heap-size=n Set maximum shared heap size in bytes, default is 0 KB\n");
70-
#endif
7168
#if WASM_ENABLE_JIT != 0
7269
printf(" --llvm-jit-size-level=n Set LLVM JIT size level, default is 3\n");
7370
printf(" --llvm-jit-opt-level=n Set LLVM JIT optimization level, default is 3\n");
@@ -587,11 +584,6 @@ main(int argc, char *argv[])
587584
#if WASM_ENABLE_GC != 0
588585
uint32 gc_heap_size = GC_HEAP_SIZE_DEFAULT;
589586
#endif
590-
#if WASM_ENABLE_SHARED_HEAP != 0
591-
uint32 shared_heap_size = 0;
592-
wasm_shared_heap_t shared_heap = NULL;
593-
SharedHeapInitArgs shared_heap_init_args;
594-
#endif
595587
#if WASM_ENABLE_JIT != 0
596588
uint32 llvm_jit_size_level = 3;
597589
uint32 llvm_jit_opt_level = 3;
@@ -707,13 +699,6 @@ main(int argc, char *argv[])
707699
gc_heap_size = atoi(argv[0] + 15);
708700
}
709701
#endif
710-
#if WASM_ENABLE_SHARED_HEAP != 0
711-
else if (!strncmp(argv[0], "--shared-heap-size=", 19)) {
712-
if (argv[0][19] == '\0')
713-
return print_help();
714-
shared_heap_size = atoi(argv[0] + 19);
715-
}
716-
#endif
717702
#if WASM_ENABLE_JIT != 0
718703
else if (!strncmp(argv[0], "--llvm-jit-size-level=", 22)) {
719704
if (argv[0][22] == '\0')
@@ -983,23 +968,6 @@ main(int argc, char *argv[])
983968
goto fail3;
984969
}
985970

986-
#if WASM_ENABLE_SHARED_HEAP != 0
987-
if (shared_heap_size > 0) {
988-
memset(&shared_heap_init_args, 0, sizeof(shared_heap_init_args));
989-
shared_heap_init_args.size = shared_heap_size;
990-
shared_heap = wasm_runtime_create_shared_heap(&shared_heap_init_args);
991-
if (!shared_heap) {
992-
printf("Create shared heap failed.\n");
993-
goto fail4;
994-
}
995-
996-
if (!wasm_runtime_attach_shared_heap(wasm_module_inst, shared_heap)) {
997-
printf("Attach shared heap failed.\n");
998-
goto fail4;
999-
}
1000-
}
1001-
#endif
1002-
1003971
#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0
1004972
if (disable_bounds_checks) {
1005973
wasm_runtime_set_bounds_checks(wasm_module_inst, false);
@@ -1085,7 +1053,7 @@ main(int argc, char *argv[])
10851053
#if WASM_ENABLE_THREAD_MGR != 0
10861054
fail5:
10871055
#endif
1088-
#if WASM_ENABLE_DEBUG_INTERP != 0 || WASM_ENABLE_SHARED_HEAP != 0
1056+
#if WASM_ENABLE_DEBUG_INTERP != 0
10891057
fail4:
10901058
#endif
10911059
/* destroy the module instance */

product-mini/platforms/windows/main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,12 @@ main(int argc, char *argv[])
569569
shared_heap = wasm_runtime_create_shared_heap(&shared_heap_init_args);
570570
if (!shared_heap) {
571571
printf("Create shared heap failed.\n");
572-
goto fail4;
572+
goto fail5;
573573
}
574574

575575
if (!wasm_runtime_attach_shared_heap(wasm_module_inst, shared_heap)) {
576576
printf("Attach shared heap failed.\n");
577-
goto fail4;
577+
goto fail5;
578578
}
579579
}
580580
#endif
@@ -626,7 +626,10 @@ main(int argc, char *argv[])
626626
if (exception)
627627
printf("%s\n", exception);
628628

629-
#if WASM_ENABLE_DEBUG_INTERP != 0 || WASM_ENABLE_SHARED_HEAP != 0
629+
#if WASM_ENABLE_SHARED_HEAP != 0
630+
fail5:
631+
#endif
632+
#if WASM_ENABLE_DEBUG_INTERP != 0
630633
fail4:
631634
#endif
632635
/* destroy the module instance */

0 commit comments

Comments
 (0)