[fpc-devel] Need heap manager -gv explanation

Tomas Hajny XHajT03 at hajny.biz
Mon Apr 28 18:12:18 CEST 2014


On Mon, April 28, 2014 17:56, Mattias Gaertner wrote:
> On Mon, 28 Apr 2014 17:20:17 +0200
> Petr Kristan <petr.kristan at epos.cz> wrote:
>
>> Hi
>>
>> I have some application with huge usage ReAllocMem and I found the big
>> performance difference if application is compiled with -gv option (cca
>> 20x faster) then without -gv option.
>
> -gv generates code for valgrind.
> It should be slower with -gv.
>
>> I suspect fpc heap manager. Is possible to tune fpc heap manager?
>> Is some difference in heap manager if application is comiled with -gv or
>> without -gv option?

Use of valgrind requires/triggers use of cmem. Depending on the particular
use case (and potentially also the target platform), cmem may indeed be
faster.

Others would be better positioned for more detailed comparison among
various heap managers with regard to speed in different use cases, overall
memory requirements achieved by reuse of previously allocated memory, etc.

Tomas





More information about the fpc-devel mailing list