anchor.diff:      FActualInfo.FoundPath.FullPath := True;
       // Alloc(Length * SizeOf(TPoint))
       NodeInfo := FActualInfo.FoundPath.Length * SizeOf(TPoint);
  -    with FActualInfo.FoundPath.Buffer do if (NodeInfo > FAllocatedSize) then Realloc(NodeInfo);
  +    if (NodeInfo > FActualInfo.FoundPath.Buffer.FAllocatedSize) then FActualInfo.FoundPath.Buffer.Realloc(NodeInfo);
       FillAttainablePath(BestStartPoint.Node, FinishNode);
     end else
     begin
       FActualInfo.FoundPath.FullPath := False;
       // Alloc(2 * SizeOf(TPoint))
       NodeInfo := 2 * SizeOf(TPoint);
  -    with FActualInfo.FoundPath.Buffer do if (NodeInfo > FAllocatedSize) then Realloc(NodeInfo);
  +    if (NodeInfo > FActualInfo.FoundPath.Buffer.FAllocatedSize) then FActualInfo.FoundPath.Buffer.Realloc(NodeInfo);
   
       S := FActualInfo.FoundPath.Buffer.Memory;
       S.X := BestStartPoint.X;
  
positive.code:   FActualInfo.FoundPath.Distance := 0;
    if (FinishSector = SECTOR_PATHLESS) then goto fill_result;
  
    // initialize excluded points
    if (Flags and (FLAG_EXCLUDED or FLAG_CLEAN) <> 0) then
    begin
      // Excluded.NodeList
      // todo
  
      S := Params.Excludes;
      for i := Params.ExcludesCount downto 1 do
      begin
        Node := AllocateHeuristedNode(S.X, S.Y);
        Node.ParentMask := 0{locked flag};
  
        Inc(S);
      end;
    end;
  
    // finish point node
  
negative.code:     begin
        if (FActualInfo.Weights.Count <> 0) then
        begin
          HLine := FInfo.HeuristicsLine;
          HDiagonal := FInfo.HeuristicsDiagonal;
          if (not ActualizeWeights(nil, True{Flags???})) then goto weights_flags;
        end;
      end else
      if (FActualInfo.Weights.Current <> Params.Weights.FInfo) or
        (FActualInfo.Weights.UpdateId <> Params.Weights.FInfo.PrepareId) then
      begin
        HLine := FInfo.HeuristicsLine;
        HDiagonal := FInfo.HeuristicsDiagonal;
  
        if (not ActualizeWeights(Params.Weights.FInfo, True{Flags???})) then
        begin
        weights_flags:
          Flags := Flags or FLAG_WEIGHTS;
  
          if (HLine <> FInfo.HeuristicsLine) or (HDiagonal <> FInfo.HeuristicsDiagonal) then
            Flags := Flags or FLAG_HEURISTICS;
        end;
      end;
    end;
  
  
  (*
    FLAG_CACHING = (1 shl 0);
    FLAG_FINISH = (1 shl 1);
    FLAG_CLEAN = (1 shl 2);
    FLAG_TILES = (1 shl 3);
    FLAG_SECTORS = (1 shl 4);
    FLAG_EXCLUDED = (1 shl 5);
    FLAG_WEIGHTS = (1 shl 6);
    FLAG_HEURISTICS = (1 shl 7);
  *)
  
  
    // cleanup initialized nodes
    begin
      // attainable points
      if (Flags <> 0) then
      begin
        // flag has attanable? todo
        if (FActualInfo.FinishPoint.X < 0) then
          ReleaseAttainableNodes;
      end;
  
      // heuristed pool
      if (Flags and (FLAG_CACHING or FLAG_FINISH or FLAG_TILES or FLAG_HEURISTICS) <> 0) then
      begin
        with FNodes.HeuristedPool do
        if (First.Next <> @Last) then
          ReleasePoolNodes(First, Last);
      end;
  
      // unattainable pool
      if (Flags and (FLAG_CACHING or FLAG_FINISH or FLAG_SECTORS or FLAG_EXCLUDED) <> 0) then
      begin
        with FNodes.UnattainablePool do
        if (First.Next <> @Last) then
          ReleasePoolNodes(First, Last);
      end;
    end;
  
    // allocate start points
  