A (reviewed) fix for Bug#928222 Memory leak when .
A fix for Bug#928222 Memory leak when running a long stored procedure. An original patch was prepared done by Alexey Demakov. When running a long stored procedure, the server could allocate a lot of memory in the fiber garbage collected pool, when performing requests in a loop. To fix the bug, garbage collect memory after every call to rw_callback() from stored procedures module. Add ptruncate() method to palloc, which rolls back used memory to a saved position and use it in box_lua.m. Since VALGRIND MEMPOOL API doesn't support ptruncate(), don't use it, instead consistently use VALGRIND_MAKE_MEM_DEFINED/VALGRIND_MAKE_MEM_UNDEFINED. No test case since the problem is detected by a longevity test, not a functional test.
Showing
Loading
Please register or sign in to comment