gzip dynamic memory allocation size per compression is 136K. It is above
malloc trim threshold of 128K. So heap will be trimmed on each loop as
we call free. It causes break system call to be called per loop and
impacts performance. Resulting benchmark data will be inaccurate.
Trimming can be disabled by setting MALLOC_TRIMTHRESHOLD to -1.
New allocations will also cause an increase in page faults. Below are
the results for gzip with quality 4 and single thread:
Page faults with trimming: 392,546
Page faults without trimming: 388
gzip dynamic memory allocation size per compression is 136K. It is above malloc trim threshold of 128K. So heap will be trimmed on each loop as we call free. It causes break system call to be called per loop and impacts performance. Resulting benchmark data will be inaccurate. Trimming can be disabled by setting MALLOC_TRIMTHRESHOLD to -1.
New allocations will also cause an increase in page faults. Below are the results for gzip with quality 4 and single thread: Page faults with trimming: 392,546 Page faults without trimming: 388
Signed-off-by: Shijith Thotton sthotton@marvell.com