path: root/core
diff options
authorEric W. Biederman <ebiederm@xmission.com>2011-04-11 00:10:03 -0700
committerEric W. Biederman <ebiederm@xmission.com>2011-04-12 14:41:12 -0700
commit8384cd9cd440aefbd923c10999c178f05aaefca3 (patch)
tree59ce213a75cef14ea07ef8c0cad27b2d5ad17379 /core
parent6372d4c8c5c56bb5381823131ef0995f351c4111 (diff)
lwip: Rename mem_init lwip_mem_init to remove a namespace conflict.
There are efficiency problems in the lwip stack related to memory management. Remove the conflict in the name memory_init so I can experiment to see which allocator is better for large file transfers. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'core')
5 files changed, 8 insertions, 8 deletions
diff --git a/core/lwip/doc/rawapi.txt b/core/lwip/doc/rawapi.txt
index 8eec6e78..25fdc2e8 100644
--- a/core/lwip/doc/rawapi.txt
+++ b/core/lwip/doc/rawapi.txt
@@ -370,7 +370,7 @@ Call these functions in the order of appearance:
Not of much use since we set the NO_SYS 1 option in lwipopts.h,
to be called for easy configuration changes.
-- mem_init()
+- lwip_mem_init()
Initializes the dynamic memory heap defined by MEM_SIZE.
diff --git a/core/lwip/doc/sys_arch.txt b/core/lwip/doc/sys_arch.txt
index 66310a91..cac4c626 100644
--- a/core/lwip/doc/sys_arch.txt
+++ b/core/lwip/doc/sys_arch.txt
@@ -172,7 +172,7 @@ Note:
Be carefull with using mem_malloc() in sys_arch. When malloc() refers to
mem_malloc() you can run into a circular function call problem. In mem.c
-mem_init() tries to allcate a semaphore using mem_malloc, which of course
+lwip_mem_init() tries to allcate a semaphore using mem_malloc, which of course
can't be performed when sys_arch uses mem_malloc.
diff --git a/core/lwip/src/core/init.c b/core/lwip/src/core/init.c
index be0e3582..775010ac 100644
--- a/core/lwip/src/core/init.c
+++ b/core/lwip/src/core/init.c
@@ -239,7 +239,7 @@ lwip_init(void)
/* Modules initialization */
- mem_init();
+ lwip_mem_init();
diff --git a/core/lwip/src/core/mem.c b/core/lwip/src/core/mem.c
index 7928e3bf..83c97536 100644
--- a/core/lwip/src/core/mem.c
+++ b/core/lwip/src/core/mem.c
@@ -259,7 +259,7 @@ plug_holes(struct mem *mem)
* Zero the heap and initialize start, end and lowest-free
struct mem *mem;
diff --git a/core/lwip/src/include/lwip/mem.h b/core/lwip/src/include/lwip/mem.h
index 8212ec82..aeac0a81 100644
--- a/core/lwip/src/include/lwip/mem.h
+++ b/core/lwip/src/include/lwip/mem.h
@@ -45,7 +45,7 @@ extern "C" {
typedef size_t mem_size_t;
/* aliases for C library malloc() */
-#define mem_init()
+#define lwip_mem_init()
/* in case C library malloc() needs extra protection,
* allow these defines to be overridden.
@@ -77,14 +77,14 @@ typedef u16_t mem_size_t;
#endif /* MEM_SIZE > 64000 */
-/** mem_init is not used when using pools instead of a heap */
-#define mem_init()
+/** lwip_mem_init is not used when using pools instead of a heap */
+#define lwip_mem_init()
/** mem_realloc is not used when using pools instead of a heap:
we can't free part of a pool element and don't want to copy the rest */
#define mem_realloc(mem, size) (mem)
#else /* MEM_USE_POOLS */
/* lwIP alternative malloc */
-void mem_init(void);
+void lwip_mem_init(void);
void *mem_realloc(void *mem, mem_size_t size);
#endif /* MEM_USE_POOLS */
void *mem_malloc(mem_size_t size);