diff options
author | Matthias Weisser <weisserm@arcor.de> | 2011-11-05 11:40:34 +0100 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-12-10 17:54:04 -0500 |
commit | 21899b10850b8ba155b16038fac5dd8d98214842 (patch) | |
tree | 704f143e00b60eb3a2f405fb3d8870c59b527425 /include/os.h | |
parent | c90a4dd79cb17abb46689f27ff9f1c971362d6e2 (diff) |
sandbox: Add improved RAM simulation
Using mmap to allocate memory from the OS for RAM simulation we can use
u-boot own malloc implementation.
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include/os.h')
-rw-r--r-- | include/os.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h index d5df22f77c8..fd4120c3593 100644 --- a/include/os.h +++ b/include/os.h @@ -76,3 +76,11 @@ void os_exit(int exit_code); * Put tty into raw mode to mimic serial console better */ void os_tty_raw(int fd); + +/** + * Acquires some memory from the underlying os. + * + * \param length Number of bytes to be allocated + * \return Pointer to length bytes or NULL on error + */ +void *os_malloc(size_t length); |