Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.153 Beiträge
 
Delphi 12 Athens
 
#2

AW: FastMM4 und Delphi 7

  Alt 1. Jan 2018, 23:46
Ich hab grade nur 'nen FastMM4 von 2007 hier rumliegen, aber da wird sich wohl nicht viel geändert haben.
Zitat von FstMM4.pas:
Delphi-Quellcode:
{Checks that no other memory manager has been installed after the RTL MM and
that there are currently no live pointers allocated through the RTL MM.}

function CheckCanInstallMemoryManager: boolean;
begin
  {Default to error}
  Result := False;
  {Is FastMM already installed?}
  if FastMMIsInstalled then
  begin
{$ifdef UseOutputDebugString}
    OutputDebugString(AlreadyInstalledMsg);
{$endif}
{$ifndef NoMessageBoxes}
    AppendStringToModuleName(AlreadyInstalledTitle, LErrorMessageTitle);
    ShowMessageBox(AlreadyInstalledMsg, LErrorMessageTitle);
{$endif}
    exit;
  end;
  ...
  usw.
  ...
end;


initialization
{$ifndef BCB}
  {Initialize all the lookup tables, etc. for the memory manager}
  InitializeMemoryManager;
  {Has another MM been set, or has the Borland MM been used? If so, this file
   is not the first unit in the uses clause of the project's .dpr file.}

  if CheckCanInstallMemoryManager then
  begin
  {$ifdef ClearLogFileOnStartup}
    DeleteEventLog;
  {$endif}
    InstallMemoryManager;
  end;
Wenn etwas Anderes vorher Speicher mit DelphiMM reserviert hatte oder sonst irgendwas passt nicht, dann installiert sich FastMM nicht und gibt dafür eine Fehlermeldung aus.

Aktiviere mal UseOutputDebugString, starte dein Programm im Debugger und schau was im Log passiert.
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat