I could not see any memory use increase when I ran a sipsak flood for more than 10min on a config based on the one you posted on the comment:
* https://github.com/kamailio/kamailio/issues/1577#issuecomment-404720655
I removed dispatcher and nathelper modules, becuase they were not used in the Lua ksr_request_route() at all.
There is no memory usage increase reported by `top` or by the shell script you provided in a previous comment.
Are you sure you tested with latest master that includes the commit eb96593 ?