summaryrefslogtreecommitdiffstats
path: root/common/tlsf_malloc.c
Commit message (Collapse)AuthorAgeFilesLines
* common: replace license statements with SPDX-License-IdentifiersAhmad Fatoum2020-11-271-12/+1
| | | | | | | | | | | | | For all files in common/ that already have a license text: - Replace with appropriate SPDX-License-Identifier - Remove empty comment lines around replacement - remove comment completely if only thing remaining is name of file without description Reviewed-by: Roland Hieber <rhi@pengutronix.de> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tlsf: Update to v3.1Sascha Hauer2020-06-161-2/+2
| | | | | | | | This updates the tlsf implementation to v3.1. This is taken from commit deff9ab509341f264addbd3c8ada533678591905 in https://github.com/mattconte/tlsf.git. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove references to CREDITSUwe Kleine-König2020-04-271-1/+0
| | | | | | | | The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97 ("Remove the CREDITS file"). Remove references to it from several files. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tlsf_malloc: Set errno to ENOMEM on failureAndrey Smirnov2018-10-161-3/+16
| | | | | | | | Set errno to ENOMEM on failure so that correct error message can be displayed by users who rely on errno. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tlsf_malloc: dummy_malloc: Share code for calloc()Andrey Smirnov2018-10-161-16/+0
| | | | | | | | | | | | | Calloc() implementation for TLSF does not correctly check for malloc() failure which can result in a NULL pointer exception when trying to calloc() extra large buffers. Since both TLSF and dummy malloc implementations of calloc() are exactly the same, pick implementation for the latter (which does aforementioned check) and share it between the two. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* meminfo: purely cosmetical changesHolger Schurig2014-06-021-1/+1
| | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-231-1/+1
| | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tlsf_malloc: drop duplicate includeJean-Christophe PLAGNIOL-VILLARD2013-03-071-2/+0
| | | | | | | config.h is not need and already inclued by Makefile Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tlsf_malloc: return valid pointer for malloc(0)Sascha Hauer2012-04-301-0/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tlsf: implement malloc_statsSascha Hauer2011-12-231-2/+23
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add tlsf-based malloc implementationAntony Pavlov2011-12-231-0/+78
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>