check buffer capacity