diff --git a/Config.uk b/Config.uk index 6dd18fd..006061e 100644 --- a/Config.uk +++ b/Config.uk @@ -8,9 +8,8 @@ menuconfig LIBMIMALLOC bool "mimalloc: a compact general purpose allocator with excellent performance" default n select LIBUKSCHED - select LIBNEWLIBC + select LIBMUSL select LIBPOSIX_SYSINFO - select LIBPTHREAD_EMBEDDED select LIBUKALLOCREGION if LIBMIMALLOC config MIMALLOC_DEBUG diff --git a/glue.c b/glue.c index 4973cd4..1d21ed9 100644 --- a/glue.c +++ b/glue.c @@ -62,7 +62,7 @@ * 4. Transition EBT allocator -> Mimalloc: * We transition as soon as the TLS has been allocated and the %fs register * set. This is checked at every EBT allocation by inspecting - * uk_thread_current()->prv which typically points to the thread local + * uk_thread_current()->priv which typically points to the thread local * storage. Since memory allocations might happen during Mimalloc's * initialization itself (e.g. calls to malloc() by pthread) the early boot * time allocator continues to satisfy requests until Mimalloc is ready @@ -88,7 +88,7 @@ static inline int _tls_ready(void) /* Is the thread local storage ready? */ struct uk_thread *current = uk_thread_current(); - return current && current->prv != NULL; + return current && current->priv != NULL; } /* boot-time malloc interface */ diff --git a/include/uk/mimalloc.h b/include/uk/mimalloc.h index eadeae1..b2aa506 100644 --- a/include/uk/mimalloc.h +++ b/include/uk/mimalloc.h @@ -35,6 +35,7 @@ #define __LIBMIMALLOC_H__ #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/uk/mimalloc_impl.h b/include/uk/mimalloc_impl.h index 6b237cd..a077c1e 100644 --- a/include/uk/mimalloc_impl.h +++ b/include/uk/mimalloc_impl.h @@ -41,6 +41,7 @@ #define __LIBMIMALLOC_IMPL_H__ #include +#include #ifdef __cplusplus extern "C" {