Module: kamailio
Branch: master
Commit: 636c6f96d84be559a09251ba87322b685e28f9b0
URL: 
https://github.com/kamailio/kamailio/commit/636c6f96d84be559a09251ba87322b685e28f9b0

Author: Camille Oudot <[email protected]>
Committer: Camille Oudot <[email protected]>
Date: 2015-04-23T17:28:18+02:00

mem: TLSF compile-time selection improvement

now use

    make MEMMNG=2 cfg

to switch to TLSF malloc

---

Modified: Makefile.defs

---

Diff:  
https://github.com/kamailio/kamailio/commit/636c6f96d84be559a09251ba87322b685e28f9b0.diff
Patch: 
https://github.com/kamailio/kamailio/commit/636c6f96d84be559a09251ba87322b685e28f9b0.patch

---

diff --git a/Makefile.defs b/Makefile.defs
index ef419d9..313b10e 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -102,6 +102,7 @@ EXTRAVERSION = -pre0
 # memory manager switcher
 # 0 - f_malloc (fast malloc)
 # 1 - q_malloc (quick malloc)
+# 2 - tlsf_malloc (O(1) malloc and free)
 MEMMNG ?= 0
 # memory debugger switcher
 # 0 - off (no-debug mode)
@@ -501,6 +502,8 @@ data_target = $(prefix)/$(data_dir)
 #              (not true anymore, q_malloc performs approx. the same)
 # -DF_MALLOC
 #              an even faster malloc, not recommended for debugging
+# -DTLSF_MALLOC=1
+#       an implemetation of the "two levels segregation fit" malloc algorithm
 # -DDL_MALLOC
 #              a malloc implementation based on Doug Lea's dl_malloc
 # -DSF_MALLOC 
@@ -662,6 +665,9 @@ ifeq        ($(MEMDBG), 1)
                C_DEFS+= -DDBG_QM_MALLOC
 endif
        C_DEFS+= -DMEM_JOIN_FREE
+else ifeq ($(MEMMNG), 2)
+#      use tlsf malloc
+       C_DEFS+= -DTLSF_MALLOC=1
 else
 #      use f_malloc
        C_DEFS+= -DF_MALLOC


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to