[fpc-pascal] use cwstring or fpwidestring on linux
Michael Schnell
mschnell at lumino.de
Mon Oct 7 09:27:57 CEST 2013
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
More information about the fpc-pascal
mailing list