]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/malloc.h
README: Document CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
[karo-tx-uboot.git] / include / malloc.h
index 47154b0783f9dc173d9c0ec8183d916c3246e5c6..84ecf79344f6f57bbd744b18eab9b07e85d5dde6 100644 (file)
 */
 
 \f
-
+#ifndef __MALLOC_H__
+#define __MALLOC_H__
 
 /* Preliminaries */
 
@@ -284,14 +285,6 @@ extern "C" {
 
 */
 
-#ifdef DEBUG
-/* #include <assert.h> */
-#define assert(x) ((void)0)
-#else
-#define assert(x) ((void)0)
-#endif
-
-
 /*
   INTERNAL_SIZE_T is the word-size used for internal bookkeeping
   of chunk sizes. On a 64-bit machine, you can reduce malloc
@@ -494,7 +487,7 @@ do {                                                                          \
 ***/
 #undef HAVE_MREMAP     /* Not available for U-Boot */
 
-#if HAVE_MMAP
+#ifdef HAVE_MMAP
 
 #include <unistd.h>
 #include <fcntl.h>
@@ -594,7 +587,7 @@ do {                                                                          \
 
 /* #define HAVE_USR_INCLUDE_MALLOC_H */
 
-#if HAVE_USR_INCLUDE_MALLOC_H
+#ifdef HAVE_USR_INCLUDE_MALLOC_H
 #include "/usr/include/malloc.h"
 #else
 
@@ -761,7 +754,7 @@ struct mallinfo {
 
 
 #ifndef DEFAULT_MMAP_MAX
-#if HAVE_MMAP
+#ifdef HAVE_MMAP
 #define DEFAULT_MMAP_MAX       (64)
 #else
 #define DEFAULT_MMAP_MAX       (0)
@@ -936,7 +929,18 @@ int     mALLOPt();
 struct mallinfo mALLINFo();
 #endif
 
+/*
+ * Begin and End of memory area for malloc(), and current "brk"
+ */
+extern ulong mem_malloc_start;
+extern ulong mem_malloc_end;
+extern ulong mem_malloc_brk;
+
+void mem_malloc_init(ulong start, ulong size);
+void malloc_bin_reloc(void);
 
 #ifdef __cplusplus
 };  /* end of extern "C" */
 #endif
+
+#endif /* __MALLOC_H__ */