BeRo1985 / pasmp

PasMP - a parallel-processing/multi-processing library for Object Pascal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hashmap does not grow

benibela opened this issue · comments

program Project1;

{$mode objfpc}{$H+}

uses
  cthreads, sysutils,
  Classes, PasMP;


var
  map: TPasMPStringHashTable;
  p: PAnsiString;
  data: array[0..1000] of string;
  i: Integer;
begin
  map := TPasMPStringHashTable.Create(sizeof(pointer));
  for i := 0 to 1000 do begin
    writeln(i);
    data[i] := inttostr(i);
    p := @data[i];
    map.SetKeyValue(data[i], p);
  end;
  map.Free;

end.

After inserting the 48th item the hash map wants to grow, but fails to do so, and then is stuck

Fixed :-)