public int GetLength() { if (status != 0) return 0; int space = (rear - front + max_size) % max_size; return space; }