lkml.org 
[lkml]   [2022]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH v2 6/8] tools/nolibc/stdlib: Implement `malloc()`, `calloc()`, `realloc()` and `free()`
On Tue, Mar 22, 2022 at 7:18 PM Ammar Faizi wrote:
> Rounding up is not useful here, because we don't have any free list to keep
> track the unused block of memory. I mean, even if it's rounded up, the extra
> space after rounded up cannot be utilized with this design. There is no
> book-keeping that tracks it.
>
> Though, the kernel still allocates the size in multiple page size.

BTW, what David meant probably, don't call mmap() again if heap->len
is greater than new_len. Isn't that simple enough to give it a go?

-- Viro

\
 
 \ /
  Last update: 2022-03-22 13:37    [W:0.122 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site