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); }
```