summaryrefslogtreecommitdiffstats
path: root/common/dlmalloc.c
Commit message (Collapse)AuthorAgeFilesLines
* xfuncs: Be more informative when out of memory panic occursSascha Hauer2017-04-281-3/+0
| | | | | | | | When one of the xfuncs panics we can be a bit more informative. We can at least print the amount of bytes we wanted to allocate and how much memory we have left. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dlmalloc: remove unused functionsSascha Hauer2014-07-091-169/+0
| | | | | | | | | | | | | remove unused function declarations and definitions: - vallocc is #if 0 in source code - pvalloc is defined but not used - cfree is defined but not used - malloc_usable_size is unused - mallopt is not defined - mallinfo is not defined Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* meminfo: purely cosmetical changesHolger Schurig2014-06-021-4/+4
| | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dlmalloc: fix compiler warningAlexander Aring2013-11-071-1/+2
| | | | | | | | | | | | | | This patch fix a compiler warning while building sandbox barebox with gcc version 4.8.2. common/dlmalloc.c: In function ‘barebox_calloc’: common/dlmalloc.c:1756:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] void *mem = malloc(sz); ^ Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* calloc: Fix possible memory leakAlexander Shiyan2013-10-221-2/+2
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename include/mem_malloc.h to include/memory.hSascha Hauer2011-09-231-1/+1
| | | | | | | Which is a better name and also better to collect other things. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* malloc: put common memory functions to seperate fileSascha Hauer2011-04-111-50/+0
| | | | | | | These functions are needed independently of the specific malloc implementation, so move them out. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dlmalloc: sparse fixesSascha Hauer2010-10-211-20/+21
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Re-format the fileJuergen Beisert2009-12-101-912/+781
| | | | | | | Re-format the file with 'indent' and some manual corrections. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Combine memory initialization with the main memory functions.Juergen Beisert2009-12-101-57/+60
| | | | | | | | | Memory allocation is very simple in u-boot-v2. So, it makes also sense to add the "operating system" emulation layer into the main memory management source file, to keep them at one place and simple. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Use the global string functionsJuergen Beisert2009-12-101-108/+6
| | | | | | | | | Don't try to be smarter than GCC. There are various better optimizations available than to write our own. So, use the globaly available string functions instead. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Remove win32 supportJuergen Beisert2009-12-101-186/+0
| | | | | | | Remove never used code. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Remove debug codeJuergen Beisert2009-12-101-179/+0
| | | | | | | | When assert() is always defined to do nothing, the debug functions makes no sense, because they also do nothing. Removing them shrinks the code. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Use nowadays function prototypesJuergen Beisert2009-12-101-87/+1
| | | | | | | | Use a function prototype style as used in all other u-boot-v2 sources, too. Also remove C++ support. We do not use C++ in this project. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* After moving all declarations to the C source, do the same with the docJuergen Beisert2009-12-101-0/+217
| | | | | | | Done in preparation to provide this documentation for doxygen. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Remove confusing macros that hide the real functions namesJuergen Beisert2009-12-101-31/+33
| | | | | | | | | This feature is provided, to support more than u-boot-v2. But its more confusing than helpful. Remove it and do it straight forward like all other sources in this tree, too. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Use the native 'void' instead of 'Void_t'Juergen Beisert2009-12-101-29/+29
| | | | | | | We are in the *NIX world, so keep a 'void' as is. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Move private settings and configuration into the C sourceJuergen Beisert2009-12-101-1/+458
| | | | | | | | | | | Include the board config first to be able to configure the memory management in the documented way. If not used, the defaults are used. On the other hand, there is no need to pollute the other source files with these local management settings. So, move them from the header into the C source file. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Move variables to bssJuergen Beisert2009-12-101-4/+4
| | | | | | | | There is no need to init variables with 0. So, move them to the bss and let the C runtime does this job for us. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Common: expose callocNishanth Menon2008-08-151-0/+1
| | | | | | | calloc is not exported by default. This patch exposes the same. Signed-off-by: Nishanth Menon <x0nishan@ti.com>
* fix warnings in malloc code introduced by last commitsSascha Hauer2008-06-031-2/+2
|
* add missing includeSascha Hauer2007-10-041-0/+1
|
* export functionsSascha Hauer2007-10-041-0/+5
|
* svn_rev_683Sascha Hauer2007-07-051-2/+3
| | | | more cleanups, fix compiler warnings
* svn_rev_653Sascha Hauer2007-07-051-2/+2
| | | | restructure tree, add reginfo command
* svn_rev_606Sascha Hauer2007-07-051-10/+0
| | | | remove malloc_bin_reloc()
* svn_rev_533Sascha Hauer2007-07-051-2/+4
| | | | | | Comment out malloc_trim(). This functions gives back memory to the system via negative calls to sbrk(). This is completely useless in U-Boot since noone else could make use of this memory.
* svn_rev_521Sascha Hauer2007-07-051-1/+1
|
* svn_rev_420Sascha Hauer2007-07-051-2/+2
| | | | | | | | | | | - do more POSIX: - use DIR instead of struct dirent - use (struct dirent)->d_name instead of (struct dirent)->name - switch to a new layout for U_BOOT_CMD: - use C99 initializers to be able to add more fields to the command struct - add aliases for commands (needed mainly for help -> ? and test -> [ - This is not done for all commands yet, but the compiler will tell you ;)
* svn_rev_363Sascha Hauer2007-07-051-1/+57
| | | | add mallocinfo command
* svn_rev_178Sascha Hauer2007-07-051-8/+3
| | | | remove unneeded ifdef for arm, remove global data
* svn_rev_152Sascha Hauer2007-07-051-1/+4
| | | | remove global data gd_t and board info bd_t entirely for arm
* svn_rev_010Sascha Hauer2007-07-051-177/+0
| | | | unifdef HAVE_MMAP
* svn_rev_003Sascha Hauer2007-07-051-1021/+0
| | | | remove all #if 0 and #if 1
* GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk2006-03-311-2/+2
|
* * Code cleanup:wdenk2003-06-271-289/+274
| | | | | | | | | - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
* Initial revisionwdenk2002-10-251-0/+3317