diff --git a/runtime/include/module.h b/runtime/include/module.h index 6fb6a8f..9e35598 100644 --- a/runtime/include/module.h +++ b/runtime/include/module.h @@ -46,7 +46,7 @@ INIT_POOL(wasm_stack, wasm_stack_delete) struct module_pools { struct wasm_memory_pool memory; struct wasm_stack_pool stack; -} __attribute__((aligned(8))); +} __attribute__((aligned(CACHE_LINE))); struct module { /* Metadata from JSON Config */ diff --git a/runtime/include/types.h b/runtime/include/types.h index a660bab..1b14366 100644 --- a/runtime/include/types.h +++ b/runtime/include/types.h @@ -17,6 +17,7 @@ #define PAGE_ALIGNED __attribute__((aligned(PAGE_SIZE))) #define PAGE_SIZE (unsigned long)(1 << 12) #define WEAK __attribute__((weak)) +#define CACHE_LINE 64 #ifndef unlikely #define unlikely(x) __builtin_expect(!!(x), 0)