Skip to content

Commit fd0abab

Browse files
authored
Merge pull request #1 from hlef/staging
Update Mimalloc to match recent main tree changes
2 parents 2408907 + c1645ae commit fd0abab

File tree

4 files changed

+9
-41
lines changed

4 files changed

+9
-41
lines changed

Config.uk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Invisible option that is used to detect
2+
# if LIBMIMALLOC is available for configuration
3+
config LIBMIMALLOC_INCLUDED
4+
bool
5+
default y
6+
17
menuconfig LIBMIMALLOC
28
bool "mimalloc: a compact general purpose allocator with excellent performance"
39
default n

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Unikraft as an external library.
66

77
How to use this allocator in your unikernel application:
88

9-
- apply main-tree.patch to the main tree
109
- select "Mimalloc" in `ukboot > Default memory allocator`
1110
- pass at least 256MiB of memory to the unikernel
1211

glue.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,13 @@ struct uk_alloc *uk_mimalloc_init(void *base, size_t len)
234234
* cases we want Mimalloc to be the default allocator.
235235
* FIXME: add uk_allocregion_init_noregister() that initializes a region
236236
* allocator without registering it.
237+
* FIXME: add support for maxalloc, availmem, and addmem.
237238
*/
238239
uk_alloc_init_malloc(a, uk_mimalloc_region_malloc, uk_calloc_compat,
239240
uk_realloc_compat, uk_mimalloc_region_free,
240241
uk_mimalloc_region_posix_memalign,
241-
uk_memalign_compat, NULL);
242+
uk_memalign_compat, NULL /* maxalloc */,
243+
NULL /* availmem */, NULL /* addmem */);
242244

243245
__region_alloc = uk_allocregion_init((void *)((uintptr_t) base +
244246
metalen), len - metalen);

main-tree.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)