 
   addArray: ->
    n = lastArrLen
-   if n isnt MAX_SIZE
+   if n isnt MAX_SIZE and
+   n * 2 * struct.bytes <= MAX_BYTES
     n = n << 1
 
    capacity += n

   constructor: ->
    size = INT_SIZE
    n = length * STRING_AVG_LEN
    while size isnt MAX_SIZE and size < n
     size = size << 1
    buffers = [new ArrayBuffer size << 1]
    views = [new Int16Array buffers[0]]

      break

     n -= size
     if size isnt MAX_SIZE and
     size * 2 * struct.bytes <= MAX_BYTES
      size = size << 1
   else
    capacity = INT_SIZE
    if min_capacity?
     while capacity isnt MAX_SIZE and capacity < min_capacity and
     capacity * 2 * struct.bytes <= MAX_BYTES
      capacity = capacity << 1
    size = capacity
    lastArr = TDS.Array struct, capacity
