refactor: Align memory pools on cache lines

master
Sean McBride 3 years ago
parent b652613ece
commit 773dbf3f70

@ -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 */

@ -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)

Loading…
Cancel
Save