Is Tcl nested dictionary uses references to references, and avoids capacity issues? -


according thread: tcl max size of array tcl cannot have >128m list/dictionary elements. however, 1 have nested dictionary, total values (in different levels) exceeds number.
now, nested dictionary using references, by design? mean long in 1 level of dictionary tree, there no more 128m elements, should fine. true? thanks.

the current limitation no individual memory object (c struct or array) can larger 2gb, , it's because high-performance memory allocator (and few other key apis) uses signed 32-bit integer size of memory chunk allocate.

this wasn't significant limitation on 32-bit machine, os restrict @ time when started near limit. however, on 64-bit machine it's possible address more, while @ same time size of pointers doubled, e.g., 2gb of space means 256k elements list, since each needs @ least 1 pointer hold reference value inside it. in addition, reference counter system might hit limit in such scheme, though wouldn't problem here.

if create nested structure, total number of leaf memory objects can held within can much larger, need take great care never string serialisation of list or dictionary since hit 2gb hard limit. if you're handling large numbers of values, might want consider using database sqlite storage instead can transparently backed disk.


fixing problem messy because impacts lot of api , abi, , creates lot of wreckage in process (plus few subtle bugs if not done carefully, iirc). we'll fix in tcl 9.0.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -