Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@
* 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
* 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
* (after mi_process_load() returned).
* uk_thread_current()->tlsp. 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 (after mi_process_load() returned).
*/

/* Minimum heap size (size of an arena)
Expand All @@ -88,7 +87,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->tlsp != NULL;
}

/* boot-time malloc interface */
Expand Down
1 change: 1 addition & 0 deletions include/uk/mimalloc_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#define __LIBMIMALLOC_IMPL_H__

#include <uk/alloc.h>
#include <unistd.h>

#ifdef __cplusplus
extern "C" {
Expand Down