hashmap does not grow
benibela opened this issue · comments
Benito van der Zander commented
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
Benjamin Rosseaux commented
Fixed :-)