Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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!

1 <module name="tlsf">
2  <configure name="TLSF_MAX_FLI" value="16" />
3 </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

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>