Deutsch English Français Italiano |
<20240722215803.631b2a665d03387d3129cbc1@example.invalid> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!npeer.as286.net!npeer-ng0.as286.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Emiliano <emiliano@example.invalid> Newsgroups: comp.lang.tcl Subject: Re: 2GB limitation Date: Mon, 22 Jul 2024 21:58:03 -0300 Organization: A noiseless patient Spider Lines: 26 Message-ID: <20240722215803.631b2a665d03387d3129cbc1@example.invalid> References: <ca9ceb402172bc85450b5a9ac4e18715@www.novabbs.com> <slrnv9s677.1l9n7.avl@logic.at> <v7m471$o8c0$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Tue, 23 Jul 2024 02:58:04 +0200 (CEST) Injection-Info: dont-email.me; posting-host="45a2d7991c9624842e9536e3de8ef290"; logging-data="944734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LeiAOYq/uHfUj5AZKzgXfCjDA61lJZOE=" Cancel-Lock: sha1:/0LcYnwRQk0IvPWRwJPTnP6Y8Os= X-Newsreader: Sylpheed 3.5.1 (GTK+ 2.24.32; i686-pc-linux-gnu) Bytes: 2110 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