[fpc-devel] heaptrc: question about missing caller stack

2014-04-29 Thread J S
[Sorry for the length and clutter of this post.] It is really helpful when tracking down memory leaks to have a call stack that goes all the way to the line where the memory is allocated. Currently, heaptrc does not do this entirely. (At least on my system.) I've created a small test program:

Re: [fpc-devel] Need heap manager -gv explanation

2014-04-29 Thread Sergei Gorelkin
28.04.2014 23:14, Petr Kristan пишет: On Mon, Apr 28, 2014 at 06:12:18PM +0200, Tomas Hajny wrote: On Mon, April 28, 2014 17:56, Mattias Gaertner wrote: On Mon, 28 Apr 2014 17:20:17 +0200 Petr Kristan petr.kris...@epos.cz wrote: Hi I have some application with huge usage ReAllocMem and I

Re: [fpc-devel] Need heap manager -gv explanation

2014-04-29 Thread Tomas Hajny
On Tue, April 29, 2014 08:45, Sergei Gorelkin wrote: . . -gv switch in command line disables the optimized i386 Move procedure (and that's basically the only thing it does), I presume that you talk about the RTL side (i.e. compiling RTL with -gv). In compiler (regardless whether you use a RTL

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Petr Kristan
On Mon, Apr 28, 2014 at 09:29:50PM +0200, Mattias Gaertner wrote: On Mon, 28 Apr 2014 21:14:14 +0200 Petr Kristan petr.kris...@epos.cz wrote: [...] Others would be better positioned for more detailed comparison among various heap managers with regard to speed in different use cases,

Re: [fpc-devel] Need heap manager -gv explanation

2014-04-29 Thread Sergei Gorelkin
29.04.2014 13:00, Jonas Maebe пишет: On 29/04/14 08:45, Sergei Gorelkin wrote: -gv switch in command line disables the optimized i386 Move procedure (and that's basically the only thing it does), so it indeed should cause slowdown. Comments say that valgrind (some pretty old version of it) is

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Tomas Hajny
On Tue, April 29, 2014 10:30, Petr Kristan wrote: . . I use inteligent block increasing. I can optimize program, but why is fpc heap manager to slow? Here is the sample stress program compilable with fpc, delphi and kylix: . . And here are results: . . Is possible to speedup heap

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Petr Kristan
On Tue, Apr 29, 2014 at 11:49:20AM +0200, Tomas Hajny wrote: On Tue, April 29, 2014 10:30, Petr Kristan wrote: . . I use inteligent block increasing. I can optimize program, but why is fpc heap manager to slow? Here is the sample stress program compilable with fpc, delphi and kylix:

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Petr Kristan
On Tue, Apr 29, 2014 at 11:41:59AM +0200, Mattias Gaertner wrote: On Tue, 29 Apr 2014 10:30:43 +0200 Petr Kristan petr.kris...@epos.cz wrote: [...] Check if you are increasing buffers in constant steps. Change the increment to exponentially. I use inteligent block increasing. I can

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Tomas Hajny
On Tue, April 29, 2014 12:12, Petr Kristan wrote: On Tue, Apr 29, 2014 at 11:49:20AM +0200, Tomas Hajny wrote: On Tue, April 29, 2014 10:30, Petr Kristan wrote: . . I use inteligent block increasing. I can optimize program, but why is fpc heap manager to slow? . . Well, results of

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Sergei Gorelkin
On 29.04.2014 14:37, Tomas Hajny wrote: I don't know the reason of your difference, but no time necessary at all (0 ms) for the valgrind variant looks very suspicious to me. But compiling by kylix compiler, i get the same results as by fpc with -gv option in linux. This is the reason why I

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Petr Kristan
On Tue, Apr 29, 2014 at 03:02:44PM +0400, Sergei Gorelkin wrote: On 29.04.2014 14:37, Tomas Hajny wrote: I don't know the reason of your difference, but no time necessary at all (0 ms) for the valgrind variant looks very suspicious to me. But compiling by kylix compiler, i get the same