Sujet : Re: 2GB limitation
De : emiliano (at) *nospam* example.invalid (Emiliano)
Groupes : comp.lang.tclDate : 23. Jul 2024, 01:58:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240722215803.631b2a665d03387d3129cbc1@example.invalid>
References : 1 2 3
User-Agent : Sylpheed 3.5.1 (GTK+ 2.24.32; i686-pc-linux-gnu)
On Mon, 22 Jul 2024 17:17:21 -0000 (UTC)
Rich <
rich@example.invalid> wrote:
Andreas Leitgeb <avl@logic.at> wrote:
alexandru <alexandru.dadalau@meshparts.de> wrote:
Will there be a fix for the 2GB size limit that a string representation
have in Tcl?
Maybe already fixed in Tcl 9.0?
Yes, that's one of the reasons for switching to tcl9 as soon as
possible.
What is the new larger "limit" in Tcl9?
In 9.0 the type of the 'length' member of the Tcl_Obj struct (the number of
bytes at '*bytes' member, not including the terminating null) has changed
from int to ptrdiff_t, so it will remain (1<<31)-1 => 2147483647 bytes on
32 bit platforms (unsurprisingly) and (1<<63)-1 => 9223372036854775807
(9,22 exabyte) on 64 bit platforms.
IIUC that's also the (new) number of elements for a Tcl list. In practice
the number will be less, since the length of the string representation of
such list will hit the '*bytes' max length first.
-- Emiliano