summary refs log tree commit diff stats
path: root/lib/system/osalloc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/osalloc.nim')
-rw-r--r--lib/system/osalloc.nim12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/system/osalloc.nim b/lib/system/osalloc.nim
index 444f11306..1ad4cf695 100644
--- a/lib/system/osalloc.nim
+++ b/lib/system/osalloc.nim
@@ -78,17 +78,7 @@ when defined(emscripten):
     munmap(mmapDescr.realPointer, mmapDescr.realSize)
 
 elif defined(genode):
-
-  proc osAllocPages(size: int): pointer {.
-   importcpp: "genodeEnv->rm().attach(genodeEnv->ram().alloc(@))".}
-
-  proc osTryAllocPages(size: int): pointer =
-    {.emit: """try {""".}
-    result = osAllocPages size
-    {.emit: """} catch (...) { }""".}
-
-  proc osDeallocPages(p: pointer, size: int) {.
-    importcpp: "genodeEnv->rm().detach(#)".}
+  include genodealloc # osAllocPages, osTryAllocPages, osDeallocPages
 
 elif defined(posix):
   const