Test suite results for test file test/theap.pp

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all 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:

Record count: 50

Total = 50

OK=36 Percentage= 72.00

Result type Cat. Count Percentage First date Last Date
Failed to compile 6 12.0 2024/09/26 19:31:00 339 2024/09/26 22:50:00 299
wasm32 6 100.0 2024/09/26 19:31:00 339 2024/09/26 22:50:00 299
wasi 6 100.0 2024/09/26 19:31:00 339 2024/09/26 22:50:00 299
3.3.1 6 100.0 2024/09/26 19:31:00 339 2024/09/26 22:50:00 299
Failed to run 8 16.0 2024/09/26 19:14:00 123 2024/09/26 19:59:00 123
riscv64 8 100.0 2024/09/26 19:14:00 123 2024/09/26 19:59:00 123
linux 8 100.0 2024/09/26 19:14:00 123 2024/09/26 19:59:00 123
3.3.1 8 100.0 2024/09/26 19:14:00 123 2024/09/26 19:59:00 123
Successfully run 36 72.0 2024/09/26 18:42:00 90 2024/09/26 23:02:00 44
i386 4 11.1 2024/09/26 19:54:00 70 2024/09/26 22:38:00 79
powerpc 14 38.9 2024/09/26 19:41:00 35 2024/09/26 23:02:00 44
powerpc64 17 47.2 2024/09/26 18:42:00 90 2024/09/26 22:29:00 103
wasm32 1 2.8 2024/09/26 22:21:00 264 2024/09/26 22:21:00 264
linux 31 86.1 2024/09/26 18:42:00 90 2024/09/26 23:02:00 44
go32v2 4 11.1 2024/09/26 19:54:00 70 2024/09/26 22:38:00 79
wasi 1 2.8 2024/09/26 22:21:00 264 2024/09/26 22:21:00 264
3.3.1 20 55.6 2024/09/26 18:42:00 90 2024/09/26 22:38:00 79
3.2.3 16 44.4 2024/09/26 21:17:00 71 2024/09/26 23:02:00 44

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.