admin
Administrator
Din: Bucharest
Inregistrat: acum 13 ani
Postari: 515
|
|
FastMM is a fast replacement memory manager for Embarcadero Delphi applications that scales well across multiple threads and CPU cores, is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.
Code:
Function Move_inc(const ASource; var ADest; ACount: Integer):boolean;
Var filer:pointer;
Begin result:=false;
filer:=pointer(ASource);
if (filer=nil) then exit else filer:=pointer(filer^);
result:=true;
Case Acount of
68:Move_i68(ASource,Adest,Acount);
64:Move_i64(ASource,Adest,Acount);
60:Move_i60(ASource,Adest,Acount);
52:Move_i52(ASource,Adest,Acount);
44:Move_i44(ASource,Adest,Acount);
36:Move_i36(ASource,Adest,Acount);
32:Move_i32(ASource,Adest,Acount);
28:Move_i28(ASource,Adest,Acount);
24:Move_i24(ASource,Adest,Acount);
20:Move_i20(ASource,Adest,Acount);
16:Move_i16(ASource,Adest,Acount);
14:Move_i14(ASource,Adest,Acount);
13:Move_i13(ASource,Adest,Acount);
12:Move_i12(ASource,Adest,Acount);
11:Move_i11(ASource,Adest,Acount);
10:Move_i10(ASource,Adest,Acount);
08:Move_i08(ASource,Adest,Acount);
04:Move_i04(ASource,Adest,Acount);
else
Move(filer,ADest,Acount);
End;
End; |
A fost odata ca-n povesti, A fost ca niciodata. Din rude mari împaratesti, O prea frumoasa fata.
Si era una la parinti Si mândra-n toate cele, Cum e Fecioara între sfinti Si luna între stele.
Code:
Implementation
Var Copyrights:record txt:shortstring;end;
{Moves data from source to dest in 16 byte chunks (rounded up). Does not
support overlapping. Count must be > 0}
Procedure Move_i04(const ASource; var ADest; ACount: Integer);
asm
mov ecx, [eax]
mov [edx], ecx {4}
end;
Procedure Move_i08(const ASource; var ADest; ACount: Integer);
asm
mov ecx, [eax]
mov [edx], ecx {4}
mov ecx, [eax + 4]
mov [edx + 4], ecx {8}
end;
Procedure Move_i10(const ASource; var ADest; ACount: Integer);
asm
mov ecx, [eax]
mov [edx], ecx
mov ecx, [eax + 4]
mov [edx + 4], ecx
mov ax, [eax + 8]
mov [edx + 8], ax
end;
Procedure Move_i11(const ASource; var ADest; ACount: Integer);
asm
mov ecx, [eax]
mov [edx], ecx {4}
mov ecx, [eax + 4]
mov [edx + 4], ecx {8}
mov ecx, [eax + 8]
mov [edx + 8], cx {10}
shr ecx,16
mov cl, [eax + 10]
end;
Procedure Move_i13(const ASource; var ADest; ACount: Integer);
asm
mov ecx, [eax]
mov [edx], ecx {4}
mov ecx, [eax + 4]
mov [edx + 4], ecx {8}
mov ecx, [eax + 8]
mov [edx + 8], ecx {12}
mov ecx, [eax + 12]
mov [edx + 12], cl {13}
end;
Procedure Move_i24(const ASource; var ADest; ACount: Integer);
asm
mov ecx, [eax]
mov [edx], ecx {4}
mov ecx, [eax + 4]
mov [edx + 4], ecx {8}
mov ecx, [eax + 8]
mov [edx + 8], ecx {12}
mov ecx, [eax + 12]
mov [edx + 12], ecx {14}
mov ecx, [eax + 16]
mov [edx + 16], ecx {16}
mov ecx, [eax + 20]
mov [edx + 20], ecx {20-24}
end;
procedure Move_i36(const ASource; var ADest; ACount: Integer);
asm
fild qword ptr [eax]
fild qword ptr [eax + 8]
fild qword ptr [eax + 16]
fild qword ptr [eax + 24]
mov ecx, [eax + 32]
mov [edx + 32], ecx
fistp qword ptr [edx + 24]
fistp qword ptr [edx + 16]
fistp qword ptr [edx + 8]
fistp qword ptr [edx]
end; |
Din umbra falnicelor bolti Ea pasul si-l îndreapta Lânga fereastra, unde-n colt Luceafarul asteapta.
Privea în zare cum pe mari Rasare si straluce, Pe miscatoarele carari Corabii negre duce.
Code:
Procedure Zero_p64(const ASource; var ADest; rNewValue: Integer);
asm
// mov ecx, [rNewValue]
mov [edx], ecx {4}
mov [edx + 04], ecx {8}
mov [edx + 08], ecx {12}
mov [edx + 12], ecx {14}
mov [edx + 16], ecx {16}
mov [edx + 20], ecx {24}
mov [edx + 24], ecx {24}
mov [edx + 28], ecx {28}
mov [edx + 32], ecx {32}
mov [edx + 36], ecx {32}
mov [edx + 40], ecx {32}
mov [edx + 44], ecx {32}
mov [edx + 48], ecx {32}
mov [edx + 52], ecx {32}
mov [edx + 56], ecx {32}
mov [edx + 60], ecx {32}
end;
Procedure Zero_p60(const ASource; var ADest; rNewValue: Integer);
asm
// mov ecx, [rNewValue]
mov [edx], ecx {4}
mov [edx + 04], ecx {8}
mov [edx + 08], ecx {12}
mov [edx + 12], ecx {14}
mov [edx + 16], ecx {16}
mov [edx + 20], ecx {24}
mov [edx + 24], ecx {24}
mov [edx + 28], ecx {28}
mov [edx + 32], ecx {32}
mov [edx + 36], ecx {32}
mov [edx + 40], ecx {32}
mov [edx + 44], ecx {32}
mov [edx + 48], ecx {32}
mov [edx + 52], ecx {32}
mov [edx + 56], ecx {32}
end;
Procedure Zero_p12(const ASource; var ADest; rNewValue: Integer);
asm
// mov ecx, [rNewValue]
mov [edx], ecx {4}
mov [edx + 04], ecx {8}
mov [edx + 08], ecx {12}
end; |
Il vede azi, îl vede mâini, Astfel dorinta-i gata; El iar, privind de saptamâni, Ii cade draga fata.
Cum ea pe coate-si razima Visând ale ei tâmple, De dorul lui si inima Si sufletu-i se împle.
Code:
Unit h_acutmem;
Interface
Procedure Move_i04(const ASource; var ADest; ACount: Integer);
Procedure Move_i08(const ASource; var ADest; ACount: Integer);
Procedure Move_i10(const ASource; var ADest; ACount: Integer);
Procedure Move_i11(const ASource; var ADest; ACount: Integer);
Procedure Move_i12(const ASource; var ADest; ACount: Integer);
Function Move_inc(const ASource; var ADest; ACount: Integer):boolean;
Procedure Zero_p64(const ASource; var ADest; rNewValue: Integer);
Procedure Zero_p60(const ASource; var ADest; rNewValue: Integer);
Procedure Zero_p56(const ASource; var ADest; rNewValue: Integer); |
Si pas cu pas pe urma ei Aluneca-n odaie, Tesând cu recile-i scântei O mreaja de vapaie.
Si când în pat se-ntinde drept Copila sa se culce, I-atinge mâinile pe piept, I-nchide geana dulce;
Code:
Initialization
Begin
Copyrights.txt:='FastMM Borland Edition ⌐ 2004, 2005 Pierre le Riche / Professional Software Development';
End;
Finalization
Begin
Copyrights.txt:='FastMM Borland Edition ⌐ 2004, 2005 Pierre le Riche / Professional Software Development';
End;
End. |
_______________________________________
|
|