[syslinux:lwip] lwip: Tune memory management for performance

syslinux-bot for Eric W. Biederman ebiederm at xmission.com
Fri Apr 22 20:06:01 PDT 2011


Commit-ID:  530e69d1cb52479b290a738c3b9b56de2e4e623d
Gitweb:     http://syslinux.zytor.com/commit/530e69d1cb52479b290a738c3b9b56de2e4e623d
Author:     Eric W. Biederman <ebiederm at xmission.com>
AuthorDate: Mon, 11 Apr 2011 00:45:31 -0700
Committer:  Eric W. Biederman <ebiederm at xmission.com>
CommitDate: Tue, 12 Apr 2011 14:41:12 -0700

lwip:  Tune memory management for performance

In a series of short tests it turns out that lwip's
default memory management seems orders' of magnitude
better than using syslinux's malloc and it uses much
less memory as well.  So just use it.

Signed-off-by: Eric W. Biederman <ebiederm at xmission.com>


---
 core/lwip/src/include/lwipopts.h |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/core/lwip/src/include/lwipopts.h b/core/lwip/src/include/lwipopts.h
index 34ddd70..7633ef9 100644
--- a/core/lwip/src/include/lwipopts.h
+++ b/core/lwip/src/include/lwipopts.h
@@ -7,16 +7,6 @@
 #define LWIP_NETIF_API		1
 #define LWIP_DNS		1
 
-#define MEM_SIZE		(1 << 18)
-#if 0
-#define MEMP_OVERFLOW_CHECK	2 /* XXX: for debugging */
-#define MEMP_SANITY_CHECK	1 /* XXX: for debugging */
-#else
-#define MEMP_OVERFLOW_CHECK	0 /* XXX: for debugging */
-#define MEMP_SANITY_CHECK	0 /* XXX: for debugging */
-#endif
-#define MEM_USE_POOLS_TRY_BIGGER_POOL	1
-
 #define TCPIP_MBOX_SIZE         	512
 #define TCPIP_THREAD_PRIO		0
 #define TCPIP_THREAD_STACKSIZE		32768
@@ -27,8 +17,8 @@
 
 #define LWIP_SOCKET			0
 
-#define MEM_LIBC_MALLOC			1
-#define MEMP_MEM_MALLOC			1
+#define MEM_LIBC_MALLOC			0
+#define MEMP_MEM_MALLOC			0
 
 #define MEMP_NUM_TCP_PCB		64
 #define MEMP_NUM_TCP_SEG		256



More information about the Syslinux-commits mailing list