Hi,


Our malloc currently uses mmap() for large allocations (and therefore the matching munmap() for freeing those large allocations). See https://github.com/seL4/musllibc/blob/sel4/src/malloc/malloc.c#L352.


So while the mmap() call is implemented, the munmap() call is not, and this is why you're seeing this issue with "syscall 91" not being successful:

https://github.com/seL4/musllibc/blob/sel4/arch/i386/bits/syscall.h#L92

https://github.com/seL4/musllibc/blob/sel4/arch/arm/bits/syscall.h#L67


Usually you allocate such a big chunk of memory for private use and management, so free() probably isn't a mission critical thing here (for the tutorials), unless there are factors I can't see -- let me know if this was helpful


--

Kofi Doku Atuah
Kernel engineer
DATA61 | CSIRO
E kofidoku.atuah@csiro.au 
www.data61.csiro.au
 
CSIRO's Digital Productivity business unit and NICTA have joined forces to create digital powerhouse Data61