Open liudongmiao opened 2 years ago
And in our test, the performance (rps) increase about 3% - 15%.
发个pr给我们测试下吧
@zxyqq I use it to resolve memory issues. And if you use Persistent Storage
(https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v3.x)#Persistent_Storage), it may won't work, as all memory would be free when transaction complete.
However, as expirevar
is not implemented (https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v3.x)#expirevar), it would be ok. And I have use this patch found a transaction-related memory leak: https://github.com/SpiderLabs/ModSecurity/pull/2727
After hook glibc, there are some clear memory leak in modsecurity transaction.
There are
pcre_malloc
andpcre_free
in this module, so I hook all memory callback in msc_transaction, and finally resolve the memory leak in modsecurity transaction.(I have implemented, however, I won't add a PR without discussion.)