[sr-dev] git:master:ca61f783: mem: proper size printed in log message for init of shm

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 23 12:34:34 CEST 2015


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-09-23T12:34:01+02:00

mem: proper size printed in log message for init of shm

---

Modified: mem/f_malloc.c
Modified: mem/q_malloc.c
Modified: mem/tlsf_malloc.c

---

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

---

diff --git a/mem/f_malloc.c b/mem/f_malloc.c
index e94703a..861cfd9 100644
--- a/mem/f_malloc.c
+++ b/mem/f_malloc.c
@@ -1155,7 +1155,7 @@ int fm_malloc_init_shm_manager(void)
 	if (_fm_shm_block==0){
 		LOG(L_CRIT, "could not initialize fm shm memory pool\n");
 		fprintf(stderr, "Too much fm shm memory demanded: %ld bytes\n",
-						pkg_mem_size);
+						shm_mem_size);
 		return -1;
 	}
 
diff --git a/mem/q_malloc.c b/mem/q_malloc.c
index 518a511..0c23639 100644
--- a/mem/q_malloc.c
+++ b/mem/q_malloc.c
@@ -1100,7 +1100,7 @@ int qm_malloc_init_shm_manager(void)
 	if (_qm_shm_block==0){
 		LOG(L_CRIT, "could not initialize qm shm memory pool\n");
 		fprintf(stderr, "Too much qm shm memory demanded: %ld bytes\n",
-						pkg_mem_size);
+						shm_mem_size);
 		return -1;
 	}
 
diff --git a/mem/tlsf_malloc.c b/mem/tlsf_malloc.c
index 9b9dde4..edf6a69 100644
--- a/mem/tlsf_malloc.c
+++ b/mem/tlsf_malloc.c
@@ -1438,7 +1438,7 @@ int tlsf_malloc_init_shm_manager(void)
 	} else {
 		LOG(L_CRIT, "could not initialize tlsf shm memory pool\n");
 		fprintf(stderr, "Too much tlsf shm memory demanded: %ld bytes\n",
-						pkg_mem_size);
+						shm_mem_size);
 		return -1;
 	}
 




More information about the sr-dev mailing list