Synapse and ShareMem ...not?!? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cdbc · 2025-07-10 09:36 Hi I'm doing a little TFTP-stuff, at the moment and I've run into a wee problem: When using the the library-memory-manager(libfpcmm.so) & ShareMem, the synapse part struggles and is unstable  ...works fine until suddenly it just stops and whines about getting memory for a string, deep inside synapse?!? Here's the deal, I'm using plugins and therefore need to use 'sharemem', but when I don't use it and use the 'built-in' memmgr, the app runs just fine and stable -- even with big files --  That to me is a huge conundrum... I've tried compiling both lib & app with 'cmem', but that's even worse. Everything is written and compiled in trunk/trunk. Any tips or advice will be deeply appreciated  Regards Benny ---------------------------------------------------------------------- Thaddy · 2025-07-10 09:54 I would use a, ahum, comobject. I will post an example within an hour or so. It will look a bit involved but it really isn't. I am used to use com for plugins. (Of course that is Windows only if that would suffice?) COM marshaling is done through the OS. No memory worries. ---------------------------------------------------------------------- cdbc · 2025-07-10 10:19 Hi Thaddy No worries mate, I'm also using comobjects in my plugins, the framework is "type-agnostic". I'm looking forward to your example  I'm /stuped/ over -what shouldn't work, works-  Any news on the major overhaul of the memory-manager in fpc? As I understand it, that should undergo this summer... ...and do you by any chance know the state of today's fpc-trunk, maybe I should "git pull" & "make"?!? Regards Benny ---------------------------------------------------------------------- Thaddy · 2025-07-10 10:31 There has been extensive work regarding the heap manager, no interface changes but faster in average cases and less fragmentation. Btw: I just found a bug in activex, so need to fix that first. (CLASSID doesn't map correctly) General point is, though, that a dll with a comobject does not need sharemem at all. ---------------------------------------------------------------------- Thaddy · 2025-07-10 11:02 provided you use COM supprted types like WideChar and WideString: these are also COM marshaled.