Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 2.3.0
Description
Currently, the MemPool would always double the size of the last allocation. This can lead to bad behavior if the MemPool transferred the ownership of all it's data except the last chunk. In the next allocation, the next allocated chunk would double the size of this large chunk which can be undesirable.
If a MemPool is used without a FreePool there are some alternatives to consider:
- Cap the chunk size at a reasonable value
- Allocate only doubles of the requested size
- Instead of doubling pick a slightly smaller factor that is a root of 2