[syslinux:lwip] lwip: Rename mem_init lwip_mem_init to remove a namespace conflict.
syslinux-bot for Eric W. Biederman
ebiederm at xmission.com
Fri Apr 22 20:06:00 PDT 2011
Commit-ID: 8384cd9cd440aefbd923c10999c178f05aaefca3
Gitweb: http://syslinux.zytor.com/commit/8384cd9cd440aefbd923c10999c178f05aaefca3
Author: Eric W. Biederman <ebiederm at xmission.com>
AuthorDate: Mon, 11 Apr 2011 00:10:03 -0700
Committer: Eric W. Biederman <ebiederm at xmission.com>
CommitDate: Tue, 12 Apr 2011 14:41:12 -0700
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 at xmission.com>
---
core/lwip/doc/rawapi.txt | 2 +-
core/lwip/doc/sys_arch.txt | 2 +-
core/lwip/src/core/init.c | 2 +-
core/lwip/src/core/mem.c | 2 +-
core/lwip/src/include/lwip/mem.h | 8 ++++----
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/core/lwip/doc/rawapi.txt b/core/lwip/doc/rawapi.txt
index 8eec6e7..25fdc2e 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 66310a9..cac4c62 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 be0e358..775010a 100644
--- a/core/lwip/src/core/init.c
+++ b/core/lwip/src/core/init.c
@@ -239,7 +239,7 @@ lwip_init(void)
/* Modules initialization */
stats_init();
sys_init();
- mem_init();
+ lwip_mem_init();
memp_init();
pbuf_init();
netif_init();
diff --git a/core/lwip/src/core/mem.c b/core/lwip/src/core/mem.c
index 7928e3b..83c9753 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
*/
void
-mem_init(void)
+lwip_mem_init(void)
{
struct mem *mem;
diff --git a/core/lwip/src/include/lwip/mem.h b/core/lwip/src/include/lwip/mem.h
index 8212ec8..aeac0a8 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 */
#if MEM_USE_POOLS
-/** 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);
More information about the Syslinux-commits
mailing list