protoverse

A metaverse protocol
git clone git://jb55.com/protoverse
Log | Files | Refs | README | LICENSE

commit b6e2bd34280e6085bce21d509e6a444364991c19
parent d8b4c03493ca5d58bf446f36245a37d460999f13
Author: William Casarin <jb55@jb55.com>
Date:   Tue,  3 Aug 2021 16:31:19 -0700

increase mem limits

Diffstat:
Msrc/wasm.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/wasm.c b/src/wasm.c @@ -28,7 +28,7 @@ #define WASM_PAGE_SIZE 65536 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) -static const int MAX_LABELS = 256; +static const int MAX_LABELS = 1024; static int interp_code(struct wasm_interp *interp); static INLINE int pop_label_checkpoint(struct wasm_interp *interp); @@ -6788,9 +6788,9 @@ int wasm_interp_init(struct wasm_interp *interp, struct module *module) stack_size = sizeof(struct val) * 0xFF; labels_size = labels_capacity * sizeof(struct label); num_labels_size = fns * sizeof(u16); - resolver_offsets_size = sizeof(int) * 0xFF; - callframes_size = sizeof(struct callframe) * 0xFF; - resolver_size = sizeof(struct resolver) * MAX_LABELS; + resolver_offsets_size = sizeof(int) * 2048; + callframes_size = sizeof(struct callframe) * 2048; + resolver_size = sizeof(struct resolver) * MAX_LABELS * 32; globals_size = sizeof(struct global_inst) * num_globals; num_elements = count_element_insts(module); @@ -6803,7 +6803,7 @@ int wasm_interp_init(struct wasm_interp *interp, struct module *module) return 0; } - memory_pages_size = 256 * WASM_PAGE_SIZE; + memory_pages_size = 64 * 256 * WASM_PAGE_SIZE; /* 1 gb virt */ memsize = stack_size +