aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_dynalloc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/vm/vm_dynalloc.c b/sys/vm/vm_dynalloc.c
index 0b8d668..dea4460 100644
--- a/sys/vm/vm_dynalloc.c
+++ b/sys/vm/vm_dynalloc.c
@@ -47,6 +47,18 @@ dynalloc(size_t sz)
return tmp;
}
+void *
+dynalloc_memalign(size_t sz, size_t align)
+{
+ struct vm_ctx *vm_ctx = vm_get_ctx();
+ void *tmp;
+
+ spinlock_acquire(&vm_ctx->dynalloc_lock);
+ tmp = tlsf_memalign(vm_ctx->tlsf_ctx, align, sz);
+ spinlock_release(&vm_ctx->dynalloc_lock);
+ return tmp;
+}
+
/*
* Reallocates memory pool created by `dynalloc()'
*