Skip to content
Snippets Groups Projects
Commit 5a7f9984 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

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.
parent 48c45a00
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment