Details
Description
The MemoryPool method Release_All() was originally conceived to allow
reuse of arena memory after being invoked, but that is not how it is
being used – existing call sites in PostingListWriter, SortWriter and
SortFieldWriter expect the memory to be freed, resulting in memory
leaks. This phenomenon is probably behind out-of-memory issues which
may occur on lengthy indexing sessions. To fix these problems, the most
straightforward approach is to change the behavior of Release_All() to
free memory.