Recent

Author Topic: Memory manager for Free Pascal and Lazarus  (Read 1960 times)

OpenSIMPLY

  • New Member
  • *
  • Posts: 11
Memory manager for Free Pascal and Lazarus
« on: June 11, 2023, 04:45:18 pm »
My friend advised me to share this thing too, so:

Simply Memory Manager for Free Pascal and Lazarus.


Simply Memory Manager is a replacement for the native memory manager for Free Pascal and Lazarus projects on Windows.

Learn more on the homepage: https://opensimply.org/smm

Red_prig

  • Full Member
  • ***
  • Posts: 143
Re: Memory manager for Free Pascal and Lazarus
« Reply #1 on: June 11, 2023, 04:52:27 pm »
It would be more interesting if you compared your memory manager not with the standard manager, but for example with this project: https://github.com/maximmasiutin/FastMM4-AVX

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
Re: Memory manager for Free Pascal and Lazarus
« Reply #2 on: June 11, 2023, 06:49:09 pm »
Bof, I did some start lazarus (start of running lazarus ide to lazarus application idle) timings a few years ago, with FastMM, Heap.inc and cmem.

The results where not different enough that not using the standard heap.inc would be justified and I had to modify fastmm to run with freepascal.

The cmem.pp implementation that gave very good results when multi-threading, at least in windows, has been so badly butchered in its implementation, that it can not be used across different languages using malloc/winheap family of memory allocation.

And whatever, a problem is that the FPC team does not want to start an alternate memory manager at the very, very beginning of the initialization of a process.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Memory manager for Free Pascal and Lazarus
« Reply #3 on: June 11, 2023, 07:51:53 pm »
I need an explanation for "avalanche-like memory allocation requests", the dictionary for avalanche points to an ice, snow or rock falling down quickly on the side of a mountain. Does this mean large requests in a short burst or what?

OpenSIMPLY

  • New Member
  • *
  • Posts: 11
Re: Memory manager for Free Pascal and Lazarus
« Reply #4 on: June 11, 2023, 08:22:20 pm »
I need an explanation for "avalanche-like memory allocation requests", the dictionary for avalanche points to an ice, snow or rock falling down quickly on the side of a mountain. Does this mean large requests in a short burst or what?

Exactly.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11447
  • FPC developer.
Re: Memory manager for Free Pascal and Lazarus
« Reply #5 on: June 11, 2023, 09:26:36 pm »
My friend advised me to share this thing too, so:

Simply Memory Manager for Free Pascal and Lazarus.


This already has been plugged, and there was no answer to any enquiries to why it was a good thing. See e.g. https://forum.lazarus.freepascal.org/index.php/topic,63085.msg477738.html#msg477738

OpenSIMPLY

  • New Member
  • *
  • Posts: 11
Re: Memory manager for Free Pascal and Lazarus
« Reply #6 on: June 11, 2023, 10:07:49 pm »
This already has been plugged, and there was no answer to any enquiries to why it was a good thing. See e.g. https://forum.lazarus.freepascal.org/index.php/topic,63085.msg477738.html#msg477738

Funny. I didn't get any feedback on using Simply Memory Manager.

OpenSIMPLY

  • New Member
  • *
  • Posts: 11
Re: Memory manager for Free Pascal and Lazarus
« Reply #7 on: June 11, 2023, 10:17:55 pm »
It would be more interesting if you compared your memory manager not with the standard manager, but for example with this project: https://github.com/maximmasiutin/FastMM4-AVX

Actually, I only wrote Simply Memory Manager to prevent memory errors. The slightly faster speed is just a side effect.

If you want to compare performance, just modify the project included in the SMM distribution; plug in the memory manager of interest there.


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11447
  • FPC developer.
Re: Memory manager for Free Pascal and Lazarus
« Reply #8 on: June 11, 2023, 10:37:52 pm »
This already has been plugged, and there was no answer to any enquiries to why it was a good thing. See e.g. https://forum.lazarus.freepascal.org/index.php/topic,63085.msg477738.html#msg477738

Funny. I didn't get any feedback on using Simply Memory Manager.

The questions were about substantiating claims. IOW proven performance with more than one application and on both 32-bit and 64-bit.

I got the impression the memory manager was mainly aimed at shoehorning an application that is near the 32-bit memory threshold to remain 32-bit.   

Besides that, GPL for a reusable unit is next to useless as a license.

OpenSIMPLY

  • New Member
  • *
  • Posts: 11
Re: Memory manager for Free Pascal and Lazarus
« Reply #9 on: June 12, 2023, 02:12:32 pm »

The questions were about substantiating claims. IOW proven performance with more than one application and on both 32-bit and 64-bit.

I got the impression the memory manager was mainly aimed at shoehorning an application that is near the 32-bit memory threshold to remain 32-bit.   

Besides that, GPL for a reusable unit is next to useless as a license.

As I mentioned above, the SMM was written to prevent memory errors. It works symmetrically for both 32- and 64-bit applications (at least I think so).

The issue of a license is, in principle, a matter of debate. The license could be changed to the LGPL. If a person wants to change something, she/he just has to ask the question first. Again: I have no feedback, only downloads.

 

TinyPortal © 2005-2018