diff --git a/.vscode/settings.json b/.vscode/settings.json index a94bed6..2223994 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "files.associations": { + "*.ld": "llvm", "*.inc": "cpp", "arm_nnexamples_cifar10_parameter.h": "c", "arm_nnexamples_cifar10_weights.h": "c", @@ -87,7 +88,8 @@ "debuglog.h": "c", "worker_thread_execute_epoll_loop.h": "c", "sandbox_set_as_running.h": "c", - "sandbox_summarize_page_allocations.h": "c" + "sandbox_summarize_page_allocations.h": "c", + "wasm_types.h": "c" }, "files.exclude": { "**/.git": true, diff --git a/runtime/include/types.h b/runtime/include/types.h index 77c95c3..7e2947e 100644 --- a/runtime/include/types.h +++ b/runtime/include/types.h @@ -21,12 +21,6 @@ #define PAGE_ALIGNED __attribute__((aligned(PAGE_SIZE))) #define WEAK __attribute__((weak)) -/* FIXME: per-module configuration? Issue #101 */ -#define WASM_PAGE_SIZE (1024 * 64) /* 64KB */ -#define WASM_START_PAGES (1 << 8) /* 16MB */ -#define WASM_MAX_PAGES (1 << 15) /* 4GB */ -#define WASM_STACK_SIZE (1 << 19) /* 512KB */ - /* These are per module symbols and I'd need to dlsym for each module. instead just use global constants, see above macros. The code generator compiles in the starting number of wasm pages, and the maximum number of pages If we try and allocate more than max_pages, we should fault */ diff --git a/runtime/include/wasm_types.h b/runtime/include/wasm_types.h index 1a40900..1a44749 100644 --- a/runtime/include/wasm_types.h +++ b/runtime/include/wasm_types.h @@ -2,6 +2,12 @@ #include +/* FIXME: per-module configuration? Issue #101 */ +#define WASM_PAGE_SIZE (1024 * 64) /* 64KB */ +#define WASM_START_PAGES (1 << 8) /* 16MB */ +#define WASM_MAX_PAGES (1 << 15) /* 4GB */ +#define WASM_STACK_SIZE (1 << 19) /* 512KB */ + /* bytes, not wasm pages */ struct wasm_memory { void * start; /* after sandbox struct */