Board index » delphi » Fastcode MM B&V 0.31
Dennis
![]() Delphi Developer |
Dennis
![]() Delphi Developer |
Fastcode MM B&V 0.31 |
Eric Grange
![]() Delphi Developer |
2005-04-22 05:15:21 PM
Re:Fastcode MM B&V 0.31QuoteLet us start a todo list. to MemoryManager_Name = 'RecyclerMM'; ;) |
Dennis
![]() Delphi Developer |
2005-04-22 05:21:35 PM
Re:Fastcode MM B&V 0.31
more MemUsage benchmarks.
very long running multithread validation to go under fastcode quality label validation function that makes the rtl mm fail due to fragmentation. regards dennis |
Nathanial Woolls
![]() Delphi Developer |
2005-04-22 09:49:14 PM
Re:Fastcode MM B&V 0.31
Set position to poScreenCenter
I'd love to see chart views for each benchmark (not all benchmarks all mms) |
Dennis
![]() Delphi Developer |
2005-04-25 09:41:48 PM
Re:Fastcode MM B&V 0.31
I would like to see a version of Recycler that passes validation.
regards dennis |
Eric Grange
![]() Delphi Developer |
2005-04-25 11:53:12 PM
Re:Fastcode MM B&V 0.31QuoteI would like to see a version of Recycler that passes validation. everything in the process, not sure when I will have time to look at it again... Though I guess I will focus on nailing that cache issue for good first. Eric |
Dennis
![]() Delphi Developer |
2005-04-26 08:57:09 PM
Re:Fastcode MM B&V 0.31
Hi
Fixed Cardinal cast to Integer cast. Old bug fix that failed to get released function TMMValidation.Validate8 : Boolean; var I1, I2, I3, J1, J2 : Cardinal; pMem : Pointer; PointerArray : array[1..10] of Pointer; MemoryStatus : TMemoryStatus; const BYTESTOALLOCATE : Cardinal = 2;//2 byte begin for I1 := 1 to Length(PointerArray) do PointerArray[I1] := nil; try Result := True; for I2 := 1 to Length(PointerArray) do begin GlobalMemoryStatus(MemoryStatus); if MemoryStatus.dwAvailVirtual>= BYTESTOALLOCATE then begin //Allocate all pointers GetMem(pMem, BYTESTOALLOCATE); PointerArray[I2] := pMem; end; end; for J1 := 1 to Length(PointerArray)-1 do for J2 := J1+1 to Length(PointerArray) do begin //No pointers can overlap = be closer than BYTESTOALLOCATE if Cardinal(Abs(Integer(PointerArray[J1]) - Integer(PointerArray[J2]))) < BYTESTOALLOCATE then begin Result := False; Break; end; end; //Free all pointers for I3 := 1 to Length(PointerArray) do begin pMem := PointerArray[I3]; FreeMem(pMem); PointerArray[I3] := nil; end; except Result := False; end; end; Regards Dennis |
Dennis
![]() Delphi Developer |
2005-04-26 08:57:44 PM
Re:Fastcode MM B&V 0.31
One more
function TMMValidation.Validate9 : Boolean; var I1, I2, I3, J1, J2, BytesToAllocate : Cardinal; pMem : Pointer; PointerArray : array[1..2000] of Pointer; MemoryStatus : TMemoryStatus; const BYTESTOALLOCATEMAX : Cardinal = 3000;//3000 byte begin Result := True; try for BytesToAllocate := 1 to BYTESTOALLOCATEMAX do begin for I1 := 1 to Length(PointerArray) do PointerArray[I1] := nil; for I2 := 1 to Length(PointerArray) do begin GlobalMemoryStatus(MemoryStatus); if MemoryStatus.dwAvailVirtual>= BytesToAllocate then begin //Allocate all pointers GetMem(pMem, BytesToAllocate); PointerArray[I2] := pMem; end; end; for J1 := 1 to Length(PointerArray)-1 do for J2 := J1+1 to Length(PointerArray) do begin //No pointers can overlap = be closer than BytesToAllocate if Cardinal(Abs(Integer(PointerArray[J1]) - Integer(PointerArray[J2]))) < BytesToAllocate then begin Result := False; Exit; end; end; //Free all pointers for I3 := 1 to Length(PointerArray) do begin pMem := PointerArray[I3]; FreeMem(pMem); PointerArray[I3] := nil; end; end; except Result := False; end; end; |
Dennis
![]() Delphi Developer |
2005-04-26 08:58:53 PM
Re:Fastcode MM B&V 0.31
The last one
function TMMValidation.Validate7 : Boolean; var I1, I2, I3, J1, J2 : Cardinal; pMem : Pointer; PointerArray : array[1..10] of Pointer; MemoryStatus : TMemoryStatus; const BYTESTOALLOCATE : Cardinal = 1;//1 byte begin for I1 := 1 to Length(PointerArray) do PointerArray[I1] := nil; try Result := True; for I2 := 1 to Length(PointerArray) do begin GlobalMemoryStatus(MemoryStatus); if MemoryStatus.dwAvailVirtual>= BYTESTOALLOCATE then begin //Allocate all pointers GetMem(pMem, BYTESTOALLOCATE); PointerArray[I2] := pMem; end; end; for J1 := 1 to Length(PointerArray)-1 do for J2 := J1+1 to Length(PointerArray) do begin //No pointers can overlap = be closer than BYTESTOALLOCATE if Cardinal(Abs(Integer(PointerArray[J1]) - Integer(PointerArray[J2]))) < BYTESTOALLOCATE then begin Result := False; Break; end; end; //Free all pointers for I3 := 1 to Length(PointerArray) do begin pMem := PointerArray[I3]; FreeMem(pMem); PointerArray[I3] := nil; end; except Result := False; end; end; |
Dennis
![]() Delphi Developer |
2005-04-27 02:17:02 PM
Re:Fastcode MM B&V 0.31
I will make a release now with some of the issues on the todo list made.
Eric: Can you mail me the version of Recycler you want included? Regards Dennis |
Dennis
![]() Delphi Developer |
2005-04-27 02:54:15 PM
Re:Fastcode MM B&V 0.31
Released in attachments
Fixed/Done 3 validation functions: Cardinal casts changed to Integer New DKC_IA32_MM 'RecyclerMM' correct name Nexus disabled because it fails Main form: Set position to poScreenCenter Clean.bat included Correct icon added Version info fixed Regards Dennis |