Marten Jan de Ruiter wrote:
Wed Mar 19, 05:54:17, Frank Heckenbach wrote:
By default FreeMemPtr points to free(). I'm not sure if profiling includes subroutines (in particular, libc routines which probably were not compiled with `-pg'). If so, you could try to move the call into a subroutine to find out if free() or PrepareDisposePointer actually takes the time.
I do not know how exactly to do this. Here I insert some code that I expect to do it, and some relevant code for reference. However, I get an error: assignment from incompatible pointer type, because I do not know how to setup the pointer to my own routine.
procedure CallFreeEmjay (p: Pointer);
And do not copy the variable declaration from heap.pas (otherwise you get two distinct variables), but use the GPC unit (which also declares CGetMem etc., so you don't need to copy this, either).
Frank