aboutsummaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/shed.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/runtime/src/shed.c b/runtime/src/shed.c
index f6d63d0b..478f51c2 100644
--- a/runtime/src/shed.c
+++ b/runtime/src/shed.c
@@ -10,20 +10,10 @@ ShedObject const shed_unit = 0;
#ifdef __WASM__
-uint32_t const PAGE_SIZE = 65536;
+void* malloc(unsigned long);
-uint32_t wasm_memory_grow(uint32_t pages);
-
-void* shed__runtime__alloc(size_t size) {
- // TODO: implement a more sensible scheme. This allocates a new page on every request.
- uint32_t previous_page_count = wasm_memory_grow((size + PAGE_SIZE - 1) / PAGE_SIZE);
- return (void*) (previous_page_count * PAGE_SIZE);
-}
-
-#else
+#endif
void* shed__runtime__alloc(size_t size) {
return malloc(size);
}
-
-#endif