On 10/04/2013 11:02 PM, Sven Barth wrote:

If you want to share Unicode- or AnsiStrings between library and application you need to use a common memory manager. For example you could use unit "cmem" as one of the first units of both programs. It will work on Unix based systems and *should* work on Windows ones as well.

BTW.:

For my embedded C projects, I use different memory managers, dependent on the complexity of the project. Either a straight forward one, that just allocates blocks in a linked list or a more sophisticated one that uses different strategies for different block sizes (small: allocate equally sized blocks, medium: use a linked list within a preoccupied area, large: one area for each block.

AFAIK the fpc RTL memory manager is similarly "sophisticated", no Idea what cmem does.

I do know that for Delphi a third-party memory manager exists that works similar and on top oft hat allows for unifying the memory management of a program and the dlls called (which Delphi also does out of the box with dynamic packages).

Can "cmem" (or some other fpc aware memory manager) also unify the memory management of a program and dlls (e.g. in order to allow for "plugins to fpc programs) ?

-Michael
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to