GMT Peter Vreman wrote 22 lines
> > What can be a speed improvement is to have a value that determines how > > heap is
checked. So you can do it only once for each 10 allocations.
>
> Good idea.
> This Frequency should be a public variable, so it can be changed at any time.
> I use the CheckHeap procedure to binary search heap destructions in programs with
millions
of allocations. You can imagine, that each heap check costs a lot of time. But with
CheckHeap, binary search and of course the speedy fpc, you can track down bugs in minutes,
that would cost in other languages days to find.
>
>
> > Also checkpointer can shall be extended with a possibility to check if the pointer is
not
> > in one of the freed memory blocks. Together with the keep_released flag it can then be
> > used to find dangling pointers.
>
> :)
>
> Who will do it?
I'll do it, so you can continue your good work on Lazarus :)
heaptrc must be improved.
I have a problem with Lazarus.
I tried lazarus with cmem and it crashed. heaptrc did not found the error, nor my memcheck, an slightly improved heaptrc, which already contains the changes I suggested. Using heaptrc with keep_released needs several minutes and then thousands of linked list error appeared, so it was useless. The reason was an object, that was freed twice. I fixed that, so Lazarus now runs with cmem. But I'm sure there is another mem corruption. I tried memprof, but it simply crashed.
So, what I need is a mem checker, that can detect double freed blocks AND that does not need keep_released, because I dont have the time and mem to run AND that reacts with a useable output.
Does someone know a solution?
Mattias