From 21899b10850b8ba155b16038fac5dd8d98214842 Mon Sep 17 00:00:00 2001 From: Matthias Weisser Date: Sat, 5 Nov 2011 11:40:34 +0100 Subject: 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 Signed-off-by: Matthias Weisser Signed-off-by: Mike Frysinger --- include/os.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/os.h') diff --git a/include/os.h b/include/os.h index d5df22f77c..fd4120c359 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); -- cgit v1.2.3