On Feb 4, 3:44 pm, Charlie Bursell <
cburs...@geusnet.com> wrote:
> I posted a little on this before and did not get much. Let me try
> again with a bit more info
Being your sole responder I do appreciate the comment.
Did you at least try what I suggested ?
>
> AIX 6.1 Tcl 8.4.12 (Old, I know)
>
> Part of Script:
> ---------------------------------------------------------------
> set fidx [open $file_in_idx r]
> set idx [split [read -nonewline $fidx] \n]
> close $fidx
>
> while {![lempty $idx]} {
> set x [lvarpop idx]
> set offset [keylget x OFFSET]
> set length [keylget x LENGTH]
> set time [keylget x TIME]
> etc.
> -----------------------------------------------------------------
>
> Error: unable to alloc 284792760 bytes
> File size: 128427291 bytes
>
> AIX memory > 16 GB
>
> Ulimits all set to unlimited
>
> Any ideas as to why Tcl cannot allocate enough memory? The same
> script runs without problem on my 4GB laptop
> Is there a compile flag or something peuliar to AIX?
The difference between OSes is puzzling, assuming it is the exact same
version of TclX. Do you confirm ?
Anyway, the way you are popping values one by one off the head of your
huge list is bound to be inefficient. Do you have reasons to do that,
like a need to push back things from time to time ?
If not, please replace [lempty]+[lvarpop] with [foreach], and report
about the outcome. Indeed I suspect a leak in one of the TclX
primitives; this test could at least tell us about [lvarpop]'s
responsibility.
-Alex