aboutsummaryrefslogtreecommitdiff
path: root/libc/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sys.c')
-rw-r--r--libc/sys.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/sys.c b/libc/sys.c
index aac2d1e..db31f37 100644
--- a/libc/sys.c
+++ b/libc/sys.c
@@ -83,6 +83,17 @@ void *sys_alloc(u32 size)
return (void *)sys1(SYS_ALLOC, (int)size);
}
+u32 shalloc(u32 size)
+{
+ return (u32)sys1(SYS_SHALLOC, (int)size);
+}
+
+void *shaccess(u32 id)
+{
+ return (void *)sys1(SYS_SHACCESS, (int)id);
+}
+
+// TODO: Freeing by ptr + size could be a security risk -> only by address!
void sys_free(void *ptr, u32 size)
{
sys2(SYS_FREE, (int)ptr, (int)size);