[fpc-pascal] Strings

Noah Silva shiruba at galapagossoftware.com
Sat Jul 20 13:19:53 CEST 2013


Hi everyone,

Wait, I'm slightly confused.  It seems people are talking about two
different things:
1. Continuous memory as seen by the program running.
2. Actually physically contiguous memory.

It was my understanding that strings and dynamic arrays are allocated as a
single block, and thus from the program's point of view, their contents
should be continuous.  (Short strings certainly are!).
If the OS is using VM Mapping to convert two blocks of free memory into a
single block for your program, I assume that would affect an array of byte
just as much as a string.  (Am I missing something?)

Thank you,
    Noah Silva



2013/7/16 Carsten Bager <carsten at beas.dk>

> My code was just an example, to illustrate what I was aiming at. It is not
> actually used.
> But I think you have a point
>
> Carsten
>
> > Why not just skip all the encoding uncertainity of strings and use an
> > array of byte/char?
> >
> > It'll probably be a lot faster too
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130720/757d0173/attachment.html>


More information about the fpc-pascal mailing list