ghalliday/HPCC-Platform — comment on commit 1308164f97e19da30728d86abedd56c7784cab39
File: roxie/roxiemem/roxiemem.cpp line 1952
By ghalliday:

Well spotted. Yes it was a lurking bug.

Previously when creating the heaps it would have created one for 2048, 4096 and increasing sizes up to heapsize/20. However if the heap size is low so that heapsize/20 < 4096 it would have meant an allocation request between heapsize/20 and 4096 might have got confused. The change of 20 to firstFractionHeap is similar.

It allocates all allocations up from (maxheapsize.. (maxheapsize/20, 4096) to that same heap rather than potentially creating extra ones with little benefit.