Reminder to self: [WayBack] Have NoMessageBoxes depend on a global boolean · Issue #58 · pleriche/FastMM4 · GitHub
–jeroen
Posted by jpluimers on 2018/08/16
Reminder to self: [WayBack] Have NoMessageBoxes depend on a global boolean · Issue #58 · pleriche/FastMM4 · GitHub
–jeroen
Posted in Delphi, Development, FastMM, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/15
Though no maintenance for over 2 years, it ScaleMM seems among the fastest of Delphi memory managers: [WayBack] GitHub – andremussche/scalemm: Fast scaling memory manager for Delphi
Full story via [WayBack] A success story – kudos to ScaleMM, +André Mussche… – Ondrej Kelle – Google+ at [WayBack] just tried Scaled MM – cut the time for 100k down from 51 minutes to 40 minutes. That’s with 18 (9+9) cores allocated to the app and 2 to everything else. Wow, allocating 8 + 8 and the time drops even more… – Russell Weetch
Two lessons on multi-threading here:
Some history (as ScaleMM, TopMM and FastMM seem to be related):
There are also some IntelTBB memory manager references at https://plus.google.com/+RussellWeetch/posts/W4EQgLme5ud [WayBack]
–jeroen
Posted in Delphi, Development, FastMM, Software Development | Leave a Comment »
Posted by jpluimers on 2018/06/01
Reminder to self: when you get Unknown function at TMethodImplementationIntercept in a Delphi stack trace from the Exception.StackTrace property or FastMM memory report:
Via:
The Exception.StackTrace was introduced in Delphi 2009 that extended these [WayBack] Exception Members:
Self or the innermost InnerException)Some notes:
GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer;
CleanUpStackInfoProc: procedure (Info: Pointer);
GetStackInfoStringProc: function (Info: Pointer): string;
TMethodImplementationIntercept was introduced in the System.Rtti unit of Delphi XE6 [WayBack]:
–jeroen
Example code:
| unit ExceptionHelperUnit; | |
| interface | |
| uses | |
| System.SysUtils; | |
| type | |
| ExceptionHelper = class helper for Exception | |
| public | |
| function Describe: string; | |
| class procedure RaiseNotImplementedException(const aClass: TClass; const aMethodName: string); | |
| class function GetStackTrace: string; | |
| end; | |
| implementation | |
| uses | |
| System.RTLConsts, | |
| System.SysConst; | |
| type | |
| EStackTraceException = class(Exception); // EProgrammerNotFound to make it really clear this is only to be used in very limited places ?? | |
| { ExceptionHelper } | |
| function ExceptionHelper.Describe: string; | |
| var | |
| lStackTrace: string; | |
| begin | |
| Result := inherited ToString(); | |
| if Self is EInOutError then | |
| if Result = System.RTLConsts.SInvalidFileName then | |
| Result := System.SysConst.SInvalidFileName; | |
| if Assigned(StackInfo) then | |
| lStackTrace := StackTrace | |
| else | |
| lStackTrace := 'empty'; | |
| Result := Format('Exception'#13#10'%s at $%p: %s'#13#10'with StackTrace'#13#10'%s', [ClassName, ExceptAddr, Result, lStackTrace]); | |
| end; | |
| class function ExceptionHelper.GetStackTrace: string; | |
| begin | |
| try | |
| Result := 'Get StackTrace via Exception.'; | |
| raise EStackTraceException.Create(Result) at ReturnAddress; | |
| except | |
| on E: EStackTraceException do | |
| Result := E.StackTrace; | |
| end; | |
| end; | |
| class procedure ExceptionHelper.RaiseNotImplementedException(const aClass: TClass; const aMethodName: string); | |
| begin | |
| raise ENotImplemented.CreateFmt('Method %s.%s is not implemented.', [aClass.ClassName, aMethodName]); | |
| end; | |
| end. |
Posted in Delphi, Development, FastMM, Software Development | Leave a Comment »
Posted by jpluimers on 2018/05/01
Interesting fork of FastMM4 for which I now think I understand why it is not merged into the regular FastMM4 repository: [WayBack] GitHub – maximmasiutin/FastMM4-AVX: FastMM4 fork with AVX support and multi-threaded enhancements (faster locking).
The fork does two things:
Reminder to self: how big is that impact and could the locking be separately merged into the base repository?
Eric Grange:
Looking at https://github.com/pleriche/FastMM4/issues/36 and given than the compile generates SSE2 code for floating point, I guess using AVX may be problematic when your code also does a lot of floating point using Delphi code (rather than AVX asm)
It could be that this repository is using only AVX-128, which might not have a penalty as per Advanced Vector Extensions – Wikipedia:
The AVX instructions support both 128-bit and 256-bit SIMD. The 128-bit versions can be useful to improve old code without needing to widen the vectorization, and avoid the penalty of going from SSE to AVX, they are also faster on some early AMD implementations of AVX. This mode is sometimes known as AVX-128.
Via: [WayBack] Do you use Embarcadero version of FastMM or the “official” bleeding edge version of FastMM from the gitHub repository? Any idea what are the difference… – Tommi Prami – Google+
–jeroen
Posted in Delphi, Development, FastMM, Software Development | 6 Comments »
Posted by jpluimers on 2017/05/17
Brilliant:
if it is a console program and it was started any other way (from the Windows Explorer, from the Delphi IDE with or without debugger, from another non-console program), then, before the console window can close, it will display:
Press any key...
Source: Delphi Corner Weblog: New: Velthuis.AutoConsole unit [WayBack]
via:
–jeroen
Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, FastMM, Software Development | Leave a Comment »
Posted by jpluimers on 2016/03/22
The comments show some nice links to comparison overviews of hashing algorithms.
New experimental FastMM version was committed to https://github.com/gabr42/FastMM4/tree/Locking_Improvements.New in this version:- Slightly simplifie… – Primož Gabrijelčič – Google+
Source: New experimental FastMM version was committed to https://github.com/gabr42/Fa…
–jeroen
Posted in Delphi, Development, FastMM, Software Development | Leave a Comment »
Posted by jpluimers on 2016/02/23
Updated the homepage in the source and readme to reflect the move to GitHub.
Source: pleriche/FastMM4@245706d
In related news: Primož Gabrijelčič is contributing to it as well: his pull request got processed https://github.com/pleriche/FastMM4/pull/1 implemented FastReallocMem logger.
–jeroen
via: Edwin Yip Delphi Developers
Posted in Delphi, Development, FastMM, Software Development | Leave a Comment »
Posted by jpluimers on 2014/11/20
Ever since the Delphi build engine got changed to MS Build in Delphi 2007, many people use Delphi build events. Their order is prebuild, prelink and postbuild (or maybe better spelled pre-build, pre-link and post-build).
Before Delphi 2007, you had to fiddler with project groups and dependencies to fake pre-build and post-build events. For an example see Pre and Post-Build Automation in Delphi.
One of the really good things about these events is that build events appear in the output tab of the messages window.
One of the really bad things is that there is hardly any documentation about the build events.
At least two important things are missing:
Let’s explain these. Read the rest of this entry »
Posted in Conference Topics, Conferences, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Event, FastMM, QC, Software Development | 5 Comments »
Posted by jpluimers on 2014/04/10
I just discovered that almost 2 weeks ago, the FastMM code repository added support for these defines in Mac OS X in Commit [r67].:
This is great news!
Note: this is not a full FastMM release, but since the original change by Sebastian Zierer has been done about half a year ago, the code is pretty stable.
Thanks mnasman for mentioning this on Delphi Redit, and Ralf Stocker for announcing this in the Non-Tech newsgroup.
–jeroen
Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, FastMM, Software Development | 2 Comments »
Posted by jpluimers on 2014/03/06
If you run FastMM4 in FullDebugMode, then here are two tips that new (and sometimes existing users) often overlook:
FullDebugMode directive in the IDE, build your project.The first makes sure all units are compiled with FullDebugMode (Delphi does not always do that automagically).
The second makes sure your EXE can access the DLL that writes out your *MemoryManager_EventLog.txt file containing memory leaks and other issues FastMM4 detected.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Event, FastMM, Software Development | 2 Comments »