summaryrefslogtreecommitdiffstats
path: root/common/tlsf_malloc.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>