docs: public void push(T val)
      {
          backChunk.values[backPos] = val;
          backChunk = endChunk;
          backPos = endPos;
  
          if (++endPos != size) {
              return;
          }
  
          Chunk<T> sc = spareChunk;
          if (sc != beginChunk) {
              spareChunk = spareChunk.next;
              endChunk.next = sc;
              sc.prev = endChunk;
          }
          else {
              endChunk.next = new Chunk<>(size, memoryPtr);
              memoryPtr += size;
              endChunk.next.prev = endChunk;
          }
          endChunk = endChunk.next;
          endPos = 0;
      }