Fix issue with over-allocation of memory, allocate in blocks of 256