Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-08-22
09:11
Merge [410d0ff3eb5e0b31], "Bug [f5e36eb588] - uncompiled lassign memory usage for lseq". Replace Tcl... check-in: 89d323ba4d user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE
2023-09-17
09:59 • Closed ticket [f5e36eb588]: Uncompiled lassign on lseq results in memory bloat</... artifact: 75e39849cc user: apnadkarni
09:56
Bug [f5e36eb588] - uncompiled lassign memory usage for lseq check-in: 410d0ff3eb user: apnadkarni tags: trunk, main
05:08 • New ticket [f5e36eb588] Uncompiled lassign on lseq results in memory bloat. artifact: 7bb0c3f7c2 user: apnadkarni

Uncompiled lassign on lseq results in memory bloat

Closed / Fixedf5e36eb588e585e47f6e875c7fb18acc0b1bf603Created 3 years agoUpdated 3 years ago
Descriptionmarkdown2023-09-17 05:08:09

The uncompiled version of lassign results in significant memory bloat compared to the compiled version when used on a lseq abstract list.

% set l [lseq 1000000] ; llength $l
1000000
% cat /proc/[pid]/statm
56332 1320 1040 1 0 343 0
% llength [lassign $l a]
999999
% cat /proc/[pid]/statm
56332 1320 1040 1 0 343 0
% set lassign lassign
lassign
% llength [$lassign $l a]
999999
% cat /proc/[pid]/statm
79742 24774 1040 1 0 23753 0
Referenced by2
  • 89d323ba4dMerge [410d0ff3eb5e0b31], "Bug [f5e36eb588] - uncompiled lassign memory usage for lseq". Replace Tcl_ObjInterfaceSetFnListSetFlat with Tcl_ObjInterfaceSetFnListSetDeep, and change the signatures of Tcl_ObjInterfaceSetFnListSet and Tcl_ObjInterfaceSetFnListSetDeep. Make all Tcl_Obj interface functions return a standard Tcl value. check-in2024-08-22 09:11:12
  • 410d0ff3ebBug [f5e36eb588] - uncompiled lassign memory usage for lseq check-in2023-09-17 09:56:12
apnadkarniplain2023-09-17 09:59:17
For clarification, not a lseq issue but potentially applicable to uncompiled lassign with any *abstract list*. Fixed in [410d0ff3eb].
Log in (anonymous is fine) to add a comment.