    return res
 
   addArray: ->
-   n = lastArr.length
+   n = lastArrLen
    if n isnt MAX_SIZE
     n = n << 1
 
    capacity += n
    lastArr = TDS.Array struct, n
+   lastArrLen = n
    lastViews = lastArr.views
    arrays.push lastArr
    allViews.push lastViews


  push: (val) ->
   res = off
   if i_lastPos is lastArr.length
    @addArray()
    i_lla++
    i_llp = 0

    allViews.push lastViews
    sum.push capacity

   lastArrLen = arrays[i_lastArr].length
   if i_lastArr >= MAX_LINEAR_ARRAY_INDEX
    MAX_LINEAR_FIND_INDEX = sum[MAX_LINEAR_ARRAY_INDEX]

