summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthias Weisser <weisserm@arcor.de>2011-11-05 11:40:34 +0100
committerMike Frysinger <vapier@gentoo.org>2011-12-10 17:54:04 -0500
commit21899b10850b8ba155b16038fac5dd8d98214842 (patch)
tree704f143e00b60eb3a2f405fb3d8870c59b527425 /include
parentc90a4dd79cb17abb46689f27ff9f1c971362d6e2 (diff)
downloadu-boot-imx-21899b10850b8ba155b16038fac5dd8d98214842.zip
u-boot-imx-21899b10850b8ba155b16038fac5dd8d98214842.tar.gz
u-boot-imx-21899b10850b8ba155b16038fac5dd8d98214842.tar.bz2
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')
-rw-r--r--include/os.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h
index d5df22f..fd4120c 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);