Re: [fpc-devel] Concatenating huge AnsiStrings

2024-07-02 Thread Michalis Kamburelis via fpc-devel
> Delphi also decided to follow the LP64 vs LLP64 rules regarding the Integer > type (it's 32-bit on 64-bit Windows, but 64-bit on 64-bit macOS and Linux) > while we decided to keep the size of Integer at 32-bit on 32- and 64-bit > systems. Just a clarification to this statement about Delphi: I

Re: [fpc-devel] Concatenating huge AnsiStrings

2024-06-28 Thread Sven Barth via fpc-devel
Virgo Pärna via fpc-devel schrieb am Fr., 28. Juni 2024, 08:41: > On Fri, 21 Jun 2024 20:03:56 +0200, Marco van de Voort via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > > Probably terminate with a heap out of memory error. > > Also depends of platform... > > program tests; > var > s,

Re: [fpc-devel] Concatenating huge AnsiStrings

2024-06-27 Thread Virgo Pärna via fpc-devel
On Fri, 21 Jun 2024 20:03:56 +0200, Marco van de Voort via fpc-devel wrote: > Probably terminate with a heap out of memory error. Also depends of platform... program tests; var s, s1, s2: ansistring; begin SetLength(s1, High(int32)); SetLength(s2, High(int32)); WriteLn(Length(s1)); Wr

Re: [fpc-devel] Concatenating huge AnsiStrings

2024-06-21 Thread Bart via fpc-devel
On Fri, Jun 21, 2024 at 8:16 PM Marco van de Voort via fpc-devel wrote: > Probably terminate with a heap out of memory error. OK, that's better than silently failing! -- Bart ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.fr

Re: [fpc-devel] Concatenating huge AnsiStrings

2024-06-21 Thread Marco van de Voort via fpc-devel
Op 21-6-2024 om 19:39 schreef Bart via fpc-devel: Possibly not a real-world problem, but some pet-project of mine has to deal with it (at least in theory). What happens if you try to concatenate 2 huge ansistrings, such that Length(String 1) + Length(String 2) > High(SizeInt)? All this assumin

Re: [fpc-devel] Concatenating huge AnsiStrings

2024-06-21 Thread Mattias Gaertner via fpc-devel
On 6/21/24 19:39, Bart via fpc-devel wrote: Hi, Possibly not a real-world problem, but some pet-project of mine has to deal with it (at least in theory). What happens if you try to concatenate 2 huge ansistrings, such that Length(String 1) + Length(String 2) > High(SizeInt)? All this assumin

[fpc-devel] Concatenating huge AnsiStrings

2024-06-21 Thread Bart via fpc-devel
Hi, Possibly not a real-world problem, but some pet-project of mine has to deal with it (at least in theory). What happens if you try to concatenate 2 huge ansistrings, such that Length(String 1) + Length(String 2) > High(SizeInt)? All this assuming you have memory enough to perform such an opera