|
@@ -47,7 +47,7 @@ const
|
|
exact_info_size : longint = 0;
|
|
exact_info_size : longint = 0;
|
|
{ function to fill this info up }
|
|
{ function to fill this info up }
|
|
fill_extra_info : FillExtraInfoType = nil;
|
|
fill_extra_info : FillExtraInfoType = nil;
|
|
-
|
|
|
|
|
|
+ error_in_heap : boolean = false;
|
|
type
|
|
type
|
|
pheap_mem_info = ^theap_mem_info;
|
|
pheap_mem_info = ^theap_mem_info;
|
|
{ warning the size of theap_mem_info
|
|
{ warning the size of theap_mem_info
|
|
@@ -217,11 +217,13 @@ begin
|
|
RunError(204);
|
|
RunError(204);
|
|
if pp^.sig=$AAAAAAAA then
|
|
if pp^.sig=$AAAAAAAA then
|
|
begin
|
|
begin
|
|
|
|
+ error_in_heap:=true;
|
|
dump_already_free(pp);
|
|
dump_already_free(pp);
|
|
if haltonerror then halt(1);
|
|
if haltonerror then halt(1);
|
|
end
|
|
end
|
|
else if pp^.sig<>$DEADBEEF then
|
|
else if pp^.sig<>$DEADBEEF then
|
|
begin
|
|
begin
|
|
|
|
+ error_in_heap:=true;
|
|
dump_error(pp);
|
|
dump_error(pp);
|
|
{ don't release anything in this case !! }
|
|
{ don't release anything in this case !! }
|
|
if haltonerror then halt(1);
|
|
if haltonerror then halt(1);
|
|
@@ -229,6 +231,7 @@ begin
|
|
end
|
|
end
|
|
else if pp^.size<>size then
|
|
else if pp^.size<>size then
|
|
begin
|
|
begin
|
|
|
|
+ error_in_heap:=true;
|
|
dump_wrong_size(pp,size);
|
|
dump_wrong_size(pp,size);
|
|
if haltonerror then halt(1);
|
|
if haltonerror then halt(1);
|
|
{ don't release anything in this case !! }
|
|
{ don't release anything in this case !! }
|
|
@@ -332,7 +335,8 @@ var
|
|
procedure TraceExit;
|
|
procedure TraceExit;
|
|
begin
|
|
begin
|
|
ExitProc:=SaveExit;
|
|
ExitProc:=SaveExit;
|
|
- Dumpheap;
|
|
|
|
|
|
+ if not error_in_heap then
|
|
|
|
+ Dumpheap;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure SetExtraInfo( size : longint;func : fillextrainfotype);
|
|
procedure SetExtraInfo( size : longint;func : fillextrainfotype);
|
|
@@ -360,7 +364,10 @@ begin
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.9 1999-01-22 12:39:22 pierre
|
|
|
|
|
|
+ Revision 1.10 1999-02-16 17:20:26 pierre
|
|
|
|
+ * no heap dump if program has an heap error !
|
|
|
|
+
|
|
|
|
+ Revision 1.9 1999/01/22 12:39:22 pierre
|
|
+ added text arg for dump_stack
|
|
+ added text arg for dump_stack
|
|
|
|
|
|
Revision 1.8 1998/12/15 23:49:51 michael
|
|
Revision 1.8 1998/12/15 23:49:51 michael
|