[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e3470c9-8bfd-3397-03c7-9bd77ed1ae06@gnuweeb.org>
Date: Tue, 22 Mar 2022 19:42:02 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>
Cc: David Laight <David.Laight@...lab.com>, Willy Tarreau <w@....eu>,
"Paul E. McKenney" <paulmck@...nel.org>,
Nugraha <richiisei@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>
Subject: Re: [RFC PATCH v2 6/8] tools/nolibc/stdlib: Implement `malloc()`,
`calloc()`, `realloc()` and `free()`
On 3/22/22 7:36 PM, Alviro Iskandar Setiawan wrote:
> 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?
Ah yes, I get the idea now, it shouldn't be a burden for this series. I
think that small improvement is not too overkill. So I will take that
suggestion for the next series.
Thanks!
--
Ammar Faizi
Powered by blists - more mailing lists