Module: kamailio
Branch: master
Commit: 93c11cab7a56377de4db80cd559a0a59b5a23528
URL: 
https://github.com/kamailio/kamailio/commit/93c11cab7a56377de4db80cd559a0a59b5a23528

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2015-09-14T10:22:46+02:00

Makefile.defs: build commands updated to support many memory managers

- following defines can be set:
   - F_MALLOC - compile f_malloc (enabled)
   - Q_MALLOC - compile q_malloc (enabled)
   - DBG_SR_MEMORY - enable debugging mode for all memory mangers
- all memory managers must be in same debugging mode
- MEMDBG=1 turns now DBG_SR_MEMORY on
- MEMMNG is no longer used, many memory managers can be enabled at the
  same time

---

Modified: Makefile.defs

---

Diff:  
https://github.com/kamailio/kamailio/commit/93c11cab7a56377de4db80cd559a0a59b5a23528.diff
Patch: 
https://github.com/kamailio/kamailio/commit/93c11cab7a56377de4db80cd559a0a59b5a23528.patch

---

diff --git a/Makefile.defs b/Makefile.defs
index da19e0e..10a4e2b 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -503,6 +503,8 @@ data_target = $(prefix)/$(data_dir)
 #              additional option to PKG_MALLOC which utilizes a fater then
 #              qm version
 #              (not true anymore, q_malloc performs approx. the same)
+# -DQ_MALLOC
+#              custom quick malloc, recommended for debugging
 # -DF_MALLOC
 #              an even faster malloc, not recommended for debugging
 # -DTLSF_MALLOC=1
@@ -661,26 +663,13 @@ C_DEFS= $(extra_defs) \
 # use make mode=debug all instead. Anyway no by default ser is  compiled w/ 
 # debugging symbols in all cases (-g). --andrei
 
-# set memory manager and its debug mode
-ifeq ($(MEMMNG), 1)
-#      use q_malloc
+# memory managers and related debug mode
+# enable f_malloc
+C_DEFS+= -DF_MALLOC
+# enable q_malloc
+C_DEFS+= -DQ_MALLOC
 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
-ifeq   ($(MEMDBG), 1)
-               C_DEFS+= -DDBG_TLSF_MALLOC
-endif
-else
-#      use f_malloc
-       C_DEFS+= -DF_MALLOC
-ifeq   ($(MEMDBG), 1)
-               C_DEFS+= -DDBG_F_MALLOC
-endif
-       C_DEFS+= -DMEM_JOIN_FREE
+       C_DEFS+= -DDBG_SR_MEMORY
 endif
 
 ifneq ($(PKG_MEM_SIZE),)


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

Reply via email to