home *** CD-ROM | disk | FTP | other *** search
- {$M 16384,0,65536}
-
- Program Test;
-
- uses
- CRT,DOS,
-
- Heap, { Intercept the allocation/deallocation routines. }
- HDebug10, { Flag errors to the user. }
- MapInfo; { Get the offending unit name and line number. }
-
- Procedure Main;
- type
- A1 = Array[1..30000] of Integer;
- var
- i : Integer;
- P1,P2 : ^A1;
- Begin
- P1 := nil;
- Dispose(P1);
- for i := 1 to 2 do
- begin
- if (i = 2) then
- InterceptFatalHeapErrors := False;
- New(P1);
- New(P2); { if i=2, the program should crash normally }
- Dispose(P1);
- Dispose(P1);
- end;
- End;
-
- BEGIN
- ClrScr;
-
- MapFileName := 'test.map';
- HeapOn;
-
- Main;
-
- END.
-