Memory allocation speed is slow by memory fragmentation on long-run test.

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Mar 29 07:39:28 UTC 2019



On 29/03/2019 08:19, JunBeom Kim wrote:
>
> Dear Sir,
>
> I am still working with my customer using RTEMS based Qt Framework in 
> long time.
>
> My customer are using memory allocation(malloc, realloc, free) with 
> frequency about small size(64, 128, 256, 512, 1024 byte, etc).
>
> When RTEMS application is run in long time(for example: 6 hours), 
> malloc() or realloc() speed is slower due to memory fragmentation.
>
> When I used other RTOS(eg: Nucleus, uC/OS, iTRON, etc) before, there 
> was almost same issue.
>

A first-fit allocator (which is used by RTEMS) is completely useless for 
dynamic memory workloads. It is all right if you only allocate and never 
free.

> I used partition memory management for resolving this.
>
> Is it correct method ?
>

We used TLSF in such situations:

https://github.com/mattconte/tlsf

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the users mailing list