9
0
Fork 0
Commit Graph

6 Commits

Author SHA1 Message Date
Krzysztof Halasa c5baa0edc4 Fix error handling with malloc, memalign etc. Introduce xmemalign().
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().

This patch also fixes code which didn't check for NULL from malloc() etc.

Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
Sascha Hauer 0a0920af28 add xstrdup function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:33:57 +02:00
Sascha Hauer 5017152f13 export functions 2007-10-04 12:33:20 +02:00
Sascha Hauer fd4cc5d0d3 add debug for xmalloc and xrealloc 2007-09-24 17:04:53 +02:00
Sascha Hauer 75a10b942c svn_rev_706
add file headers
2007-07-05 18:02:19 +02:00
Sascha Hauer 4b07af6730 svn_rev_643
structure cleanup
2007-07-05 18:02:13 +02:00