0

I am using Delphi 6 which has the old memory manager.

My program reads in and processes a large dataset. All memory is freed correctly whenever I clear the dataset or exit the program. It has no memory leaks at all.

24 MB used after starting my program with no dataset. 250 MB used after loading a large dataset. 24 MB KB after clearing the dataset completely.

but when i used Delphi 2007 which has the FastMM4 memory manager built into it, not all memory freed (i have memory leak when compile the same code using Delphi 2007)

24 MB used after starting my program with no dataset. 300 MB used after loading a large dataset. 70 MB KB after clearing the dataset completely.

but if i use ShereMem in the .dpr project(Dlphi 2007) with Borlandmm.dll from delphi6 its working fine without memory leak

i used external FastMM (not build in) with Delphi 6, the result are same as Delphi 2007 (i have memory leak using Delphi 6 with FastMM)

so its seem there is a problem when using FastMM

how can fix this issue, and keep using FAstMM?

  • 3
    That sounds like perfectly normal behaviour for a memory manager. They often choose to hold on to memory rather than return it to OS because it is more efficient to do that. FastMM is widely used and well proven. It doesn't leak. Almost certainly there is no problem with your code and you are just misinterpreting the information. Have you experienced any actual runtime problems? – David Heffernan Mar 11 '19 at 11:16
  • Thanks @DavidHeffernan ,so its normal,i have no runtime problems – Deaa Darawsheh Mar 11 '19 at 11:20
  • 3
    I mean, I can't give your program a clean bill of health from here with no knowledge of it. But what you describe doesn't sound at all unusual. Reading memory stats from task manager is not as simple as you might think. This sort of question gets asked on a weekly basis here. Try using your program for a few hours or days without restarting it? Does it continue to run correctly? – David Heffernan Mar 11 '19 at 11:31

0 Answers0