pleriche / FastMM5

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.
283 stars 73 forks source link

Truncating stackcalls and line numbers in eventLog.txt #20

Open kevinv9 opened 3 years ago

kevinv9 commented 3 years ago

When doing fulldebugmode in fastmm5 (4 does as well) and checking for leaks the lines seem to be truncated to a fix length in the memorymanager_eventlog.txt E.G. below 0000000004292815 [FormEmailPropertyViewer.pas][FormEmailPropertyViewer][_ZN23Formemailpropertyviewer22TvwEmailPropertyViewer13UpdateDisplayEv][5 0000000001E3087E [DataEntryUtils.pas][DataEntryUtils][_ZN14Dataentryutils12TEntryReader12GetIsManagedEv][273] 0000000004295080 [FormEmailPropertyViewer.pas][FormEmailPropertyViewer][_ZN23Formemailpropertyviewer22TvwEmailPropertyViewer17DoContainerChangeE 0000000002E6F999 [UViewManager.pas][UViewManager][_ZN12Uviewmanager11TViewerBase16DoContainerEventEPN9Container10TContainerERKN10Dataevents16TDa

pleriche commented 3 years ago

Hi Kevin,

I have increased the size of the line buffer from 128 to 224 characters (a 75% increase). FastMM preallocates a fixed size buffer for stack traces, so the line lengths currently have to be limited.

Please let me know whether the maximum line length is now sufficient.

Thanks, Pierre

kevinv9 commented 3 years ago

Thanks Pierre for the quick turnaround it helps a ton. The longest line I am finding so far in Generics at 223 00000000053C05EF [System.Generics.Collections.pas][MetaData][_ZN6System8Generics11Collections6TArray12BinarySearchIPN8Metadata15TMetaDataRecordEEEbPKT_iS8_RiNS_15DelphiInterfaceINS0_8Defaults12IComparer__1IS8_EEEEii][1043]