[sr-dev] [kamailio/kamailio] core: allow setting shm_mem_size in cfg if it still holds default value (25aeed9)

Maxim Malygin notifications at github.com
Tue Jan 31 10:36:19 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);
        }

```

-- 
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/commit/25aeed98a773fb796de47703a72532e5c0345f6c#commitcomment-20676416
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20170131/981eea90/attachment.html>


More information about the sr-dev mailing list