procedure GetFrameBasedStackTrace(AReturnAddresses: PNativeUInt;
AMaxDepth, ASkipFrames: Cardinal);
var
LStackTop, LStackBottom, LCurrentFrame: NativeUInt;
begin
{Get the call stack top and current bottom}
GetStackRange(LStackTop, LStackBottom);
Dec(LStackTop, 2 * SizeOf(Pointer) );
{Get the current frame start}
LCurrentFrame := LStackBottom;
{Fill the call stack}
while (AMaxDepth > 0)
and (LCurrentFrame >= LStackBottom)
and (LCurrentFrame <= LStackTop) do
begin
Hi I replaced with
MemTest.zip