[sr-dev] [kamailio/kamailio] "shm_mem_size" does not work if it was set in config file (#950)

Maxim Malygin notifications at github.com
Tue Jan 31 10:39:34 CET 2017


Your patch will override memory size set by "-m" option in case it is 64mb (-m 64).
I created another patch for my environment by moving setting sm_mem_size to default size after yyparse().

--- kamailio-4.4.3.orig/main.c  2016-09-14 16:50:30.000000000 +0300
+++ kamailio-4.4.3/main.c       2017-01-26 18:30:55.000000000 +0300
@@ -2069,9 +2069,6 @@
                                        abort();
                }
        }
-       if (shm_mem_size == 0) {
-               shm_mem_size = SHM_MEM_POOL_SIZE;
-       }

        if (endianness_sanity_check() != 0){
                fprintf(stderr, "BUG: endianness sanity tests failed\n");
@@ -2136,6 +2133,11 @@

                goto error;
        }
+
+       if (shm_mem_size == 0) {
+               shm_mem_size = SHM_MEM_POOL_SIZE;
+       }
+
        if (cfg_warnings){
                fprintf(stderr, "%d config warnings\n", cfg_warnings);
        }

It also would be good to add documentation for shm_mem_size parameter in config file (I did not find it).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/950#issuecomment-276317456
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20170131/f47c9857/attachment.html>


More information about the sr-dev mailing list