Test suite results for test file test/theap.pp

Test run data :

Run ID:
Operating system: linux
Processor: loongarch64
Version: 3.3.1
Fails/OK/Total: 38/9170/9208
Version: 3.3.1
Full version: 3.3.1-15584-g2f9ed0576e
Comment: -XR/home/muller/sys-root/loongarch64-linux -Xd -Xr/home/muller/sys-root/loongarch64-linux
Machine: cfarm421
Category: 1
SVN revisions: 2f9ed0576e:8b7dbb81b1:3f8bbd3b00:2f9ed0576e
Submitter: muller
Date: 2024/04/19 11:12:00 <> 2024/04/18
Previous run: 934325
Next run: 935672

Hide skipped tests

Hide successful tests

Test file "test/theap.pp" information:

t_id 45
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
443692659934973TrueFalseSuccessfully run

Record count: 1

No log of 934973.

Source:

{
  $Id: theap.pp,v 1.3 2000/11/30 22:38:21 peter Exp $

  Program to test heap functions, timing doesn't work
}
PROGRAM TestHeap;

Procedure InitMSTimer;
begin
end;



{Get MS Timer}
Function MSTimer:longint;
begin
  MSTimer:=0;
end;


VAR Dummy,Start, LoopTime,LoopTime2: LONGINT;
    Delta, TotalTime: LONGINT;
    L,Choice,K,T: WORD;
    BlkPtr:  ARRAY [1..10000] OF POINTER;
    BlkSize: ARRAY [1..10000] OF WORD;
    Permutation: ARRAY [1..10000] OF WORD;

BEGIN
  INitMSTimer;
   WriteLn ('Test of TP heap functions');
   WriteLn;
   TotalTime := 0;
   RandSeed := 997;
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   Start :=MSTimer;
   FOR L := 1 TO 10000 DO BEGIN
   END;
   LoopTime := MSTimer-Start;
   FOR L := 1 TO 10000 DO BEGIN
      BlkSize [L] := Random (512) + 1;
   END;
   Write ('Allocating 10000 blocks at the end of the heap: ');
   Start := MSTImer;
   FOR L := 1 TO 10000 DO BEGIN
      GetMem (BlkPtr [L], BlkSize [L]);
   END;
   Delta := MSTimer-Start-LoopTime;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   Write ('Deallocating same 10000 blocks in reverse order:');
   Start := MSTimer;
   FOR L := 1 TO 10000 DO BEGIN
      FreeMem (BlkPtr [L], BlkSize [L]);
   END;
   Delta := MSTimer-Start-LoopTime;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   Write ('Allocating 10000 blocks at the end of the heap: ');
   Start := MSTimer;
   FOR L := 1 TO 10000 DO BEGIN
      GetMem (BlkPtr [L], BlkSize [L]);
   END;
   Delta := MSTimer-Start-LoopTime;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   FOR L := 1 TO 10000 DO BEGIN
      Permutation [L] := L;
   END;
   Start := MSTimer;
   FOR L := 10000 DOWNTO 1 DO BEGIN
      Choice := Random (L)+1;
      K := Permutation [Choice];
      Permutation [Choice] := Permutation [L];
   END;
   LoopTime2 := MSTimer - Start;
   FOR L := 1 TO 10000 DO BEGIN
      Permutation [L] := L;
   END;
   Write ('Deallocating same 10000 blocks at random:       ');
   Start := MSTimer;
   FOR L := 10000 DOWNTO 1 DO BEGIN
      Choice := Random (L)+1;
      K := Permutation [Choice];
      Permutation [Choice] := Permutation [L];
      FreeMem (BlkPtr [K], BlkSize [K]);
   END;
   Delta := MSTimer - Start - LoopTime2;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   Write ('Allocating 10000 blocks at the end of the heap: ');
   Start := MSTimer;
   FOR L := 1 TO 10000 DO BEGIN
      GetMem (BlkPtr [L], BlkSize [L]);
   END;
   Delta := MSTimer-Start-LoopTime;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   FOR L := 1 TO 10000 DO BEGIN
      Permutation [L] := L;
   END;
   Start := MSTimer;
   FOR L := 10000 DOWNTO 1 DO BEGIN
      Choice := Random (L)+1;
      K := Permutation [Choice];
      T:= Permutation [L];
      Permutation [L] := Permutation [Choice];
      Permutation [Choice] := T;
   END;
   LoopTime2 := MSTimer - Start;
   FOR L := 1 TO 10000 DO BEGIN
      Permutation [L] := L;
   END;
   Write ('Deallocating 5000 blocks at random:             ');
   Start := MSTimer;
   FOR L := 10000 DOWNTO 5001 DO BEGIN
      Choice := Random (L)+1;
      K := Permutation [Choice];
      T:= Permutation [L];
      Permutation [L] := Permutation [Choice];
      Permutation [Choice] := T;
      SYSTEM.FreeMem (BlkPtr [K], BlkSize [K]);
   END;
   Delta := MSTimer-Start-LoopTime2;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   Start := MSTimer;
   FOR L := 1 TO 10000 DO BEGIN
      Dummy := MaxAvail;
   END;
   Delta := MSTimer-Start;
   Inc (TotalTime, (Delta + 5) DIV 10);
   WriteLn ('10000 calls to MaxAvail:                        ', Delta:5, ' ms');
   Start := MSTimer;
   FOR L := 1 TO 10000 DO BEGIN
      Dummy := MemAvail;
   END;
   Delta := MSTimer - Start;
   Inc (TotalTime, (Delta + 5) DIV 10);
   WriteLn ('10000 calls to MemAvail:                        ', Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   Write ('Reallocating deallocated 500 blocks at random: ');
   Start := MSTimer;
   FOR L := 5001 TO 10000 DO BEGIN
      GetMem (BlkPtr [Permutation [L]], BlkSize [Permutation [L]]);
   END;
   Delta := MSTimer-Start-LoopTime;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   Write ('Deallocating all 10000 blocks at random:        ');
   Start := MSTimer;
   FOR L := 10000 DOWNTO 1 DO BEGIN
      FreeMem (BlkPtr [L], BlkSize [L]);
   END;
   Delta := MSTimer-Start-LoopTime;
   Inc (TotalTime, Delta);
   WriteLn (Delta:5, ' ms');
   WriteLn ('MaxAvail: ', MaxAvail, '   MemAvail: ', MemAvail);
   WriteLn;
   WriteLn ('Total time for benchmark: ', TotalTime, ' ms');
END.



Link to SVN view of test/theap.pp source.