diff options
author | Simon Glass <sjg@chromium.org> | 2015-02-27 22:06:36 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-23 09:05:53 -0600 |
commit | fb5cf7f16be725aec7ab0016268b3b4e26460bee (patch) | |
tree | 755959683c0f163b7911e57d059fe467f585ab9a /common/dlmalloc.c | |
parent | 0879361fd3bc33eb52bcfb2574a78f1e52a36429 (diff) | |
download | u-boot-fb5cf7f16be725aec7ab0016268b3b4e26460bee.tar.gz u-boot-fb5cf7f16be725aec7ab0016268b3b4e26460bee.tar.bz2 u-boot-fb5cf7f16be725aec7ab0016268b3b4e26460bee.zip |
Move initf_malloc() to a common place
To allow this function to be used from SPL, move it to the malloc()
code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r-- | common/dlmalloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index b2ce063c5f..b5bb05191c 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -3261,6 +3261,17 @@ int mALLOPt(param_number, value) int param_number; int value; } } +int initf_malloc(void) +{ +#ifdef CONFIG_SYS_MALLOC_F_LEN + assert(gd->malloc_base); /* Set up by crt0.S */ + gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN; + gd->malloc_ptr = 0; +#endif + + return 0; +} + /* History: |