T *allocate() { if ( start >= length ) throw bad_alloc(); else { // initialize to default value array[start] = 0; return &(array[start++]); } }