Re: [fpc-pascal] Problem with heaptrc

2014-11-09 Thread Xiangrong Fang
2014-11-09 22:38 GMT+08:00 Michael Van Canneyt : > Code like this: > >ci := PCacheItem((buf + SizeOf(Pointer) * Random(FDepth))^); > for i := 0 to FDepth - 1 do begin > slot := buf + SizeOf(Pointer) * i; > if Pointer(slot^) = nil then begin > Inc(N); > Pointer(

Re: [fpc-pascal] Problem with heaptrc

2014-11-09 Thread Michael Van Canneyt
On Sun, 9 Nov 2014, Xiangrong Fang wrote: 2014-11-09 22:14 GMT+08:00 Xiangrong Fang : 2014-11-09 22:05 GMT+08:00 Tomas Hajny : On 9 Nov 14, at 21:58, Xiangrong Fang wrote: Are you sure that it really is endless (i.e. did you let to run for a sufficiently long time)? If you increas

Re: [fpc-pascal] Problem with heaptrc

2014-11-09 Thread Xiangrong Fang
2014-11-09 22:14 GMT+08:00 Xiangrong Fang : > 2014-11-09 22:05 GMT+08:00 Tomas Hajny : > >> On 9 Nov 14, at 21:58, Xiangrong Fang wrote: >> >> Are you sure that it really is endless (i.e. did you let to run for a >> sufficiently long time)? If you increase the amount of allocated >> blocks (which

Re: [fpc-pascal] Problem with heaptrc

2014-11-09 Thread Xiangrong Fang
2014-11-09 22:05 GMT+08:00 Tomas Hajny : > On 9 Nov 14, at 21:58, Xiangrong Fang wrote: > > Are you sure that it really is endless (i.e. did you let to run for a > sufficiently long time)? If you increase the amount of allocated > blocks (which is what happens in case of increasing your constant),

Re: [fpc-pascal] Problem with heaptrc

2014-11-09 Thread Michael Van Canneyt
On Sun, 9 Nov 2014, Tomas Hajny wrote: On 9 Nov 14, at 21:58, Xiangrong Fang wrote: Hi Xiangrong, I use heap trace utility to see if there are memory leak in my program. The source is here: https://github.com/xrfang/fpcollection/blob/aefa04f0374c94298facd8d57d4a25dafe10b753/src/demos/cach

Re: [fpc-pascal] Problem with heaptrc

2014-11-09 Thread Tomas Hajny
On 9 Nov 14, at 21:58, Xiangrong Fang wrote: Hi Xiangrong, > I use heap trace utility to see if there are memory leak in my program. > The source is here: > > https://github.com/xrfang/fpcollection/blob/aefa04f0374c94298facd8d57d4a25dafe10b753/src/demos/cache/demo.lpr > > My problem is, at the

[fpc-pascal] Problem with heaptrc

2014-11-09 Thread Xiangrong Fang
Hi All, I use heap trace utility to see if there are memory leak in my program. The source is here: https://github.com/xrfang/fpcollection/blob/aefa04f0374c94298facd8d57d4a25dafe10b753/src/demos/cache/demo.lpr My problem is, at the beginning of the main program, I have a costant definition: con