Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
tlsf module

Dynamic memory allocator

Can be used as a replacement of malloc with a O(1) allocation time

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="tlsf">
b'<configure name="TLSF_MAX_FLI" value="16" />\n '
</module>

Module configuration options

Configure Options

  • name: TLSF_MAX_FLI value: 16
    Description: limit buffer size to 2^TLSF_MAX_FLI (e.g. 64Ko for MAX_FLI of 16

Module functions

Init Functions

These initialization functions are called once on startup.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

  • /sw/ext/tlsf/tlsf.c
  • arch dependent: modules/tlsf/tlsf_malloc_arch.c

Raw tlsf.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="tlsf">
<doc>
<description>
Dynamic memory allocator
Can be used as a replacement of malloc with a O(1) allocation time
</description>
<configure name="TLSF_MAX_FLI" value="16" description="limit buffer size to 2^TLSF_MAX_FLI (e.g. 64Ko for MAX_FLI of 16"/>
</doc>
<header>
<file name="tlsf_malloc.h" />
</header>
<init fun="tlsf_init_heaps()"/>
<makefile target="ap">
<configure name="TLSF_MAX_FLI" default="16"/>
<define name="MAX_FLI" value="$(TLSF_MAX_FLI)"/>
<file_arch name="tlsf_malloc_arch.c"/>
<include name="$(PAPARAZZI_SRC)/sw/ext/tlsf"/>
<file name="tlsf.c" dir="$(PAPARAZZI_SRC)/sw/ext/tlsf"/>
</makefile>
</module>