Make TThread.GetSystemTimes on Linux non-allocating
Regarding new code: af3ebf14
Code has part:
Function GetNextWord(var l : String) : String;
var
P : Integer;
begin
P:=Pos(' ',L);
if P=0 then
P:=Length(L)+1;
Result:=Copy(L,1,P-1);
Delete(L,1,P);
L:=Trim(L);
end;
which is allocating, and also it changes the l string. It parses line like this:
cpu 21222 749 13319 106681 313 0 192 0 0 0
I suggest to rewrite this parsing, w/o allocating strings, without Trim and Delete. Example: When we step on 'digit' char '1' of number '1234', we can read the entire number by loop like this:
1234 = (((1*10)+2)*10+3)*10+4
Edited by Alexey Torgashin