]> xenbits.xensource.com Git - unikraft/libs/wamr.git/commitdiff
Add patch to use global heap buffer
authorRazvan Deaconescu <razvand@unikraft.io>
Fri, 20 Oct 2023 15:23:20 +0000 (18:23 +0300)
committerRazvan Deaconescu <razvand@unikraft.io>
Fri, 20 Oct 2023 15:53:08 +0000 (18:53 +0300)
Define the global variable `USE_GLOBAL_HEAP_BUF` as `1`. This is
required to properly allocate memory for Unikraft.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #9

patches/0005-use-global-heap-buf.patch [new file with mode: 0644]

diff --git a/patches/0005-use-global-heap-buf.patch b/patches/0005-use-global-heap-buf.patch
new file mode 100644 (file)
index 0000000..ec671f8
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/core/iwasm/products/linux/main.c
++++ b/core/iwasm/products/linux/main.c
+@@ -158,7 +158,7 @@ app_instance_repl(wasm_module_inst_t module_inst)
+     return NULL;
+ }
+-#define USE_GLOBAL_HEAP_BUF 0
++#define USE_GLOBAL_HEAP_BUF 1
+ #if USE_GLOBAL_HEAP_BUF != 0
+ static char global_heap_buf[10 * 1024 * 1024] = { 0 };