chuck/include/util_buffers.h
// return number of valid elements in the buffer
return number of valid elements in the buffer
return number of valid elements in the buffer
size_t numElements()
    {
        if(m_read == m_write)
            return 0;
        else if(m_read < m_write)
            return m_write - m_read;
        else
            return m_numElements - m_read + m_write;
    }
size_t numElements ( ) { if ( m_read == m_write ) return 0 ; else if ( m_read < m_write ) return m_write - m_read ; else return m_numElements - m_read + m_write ; }
return number of valid elements in the buffer
return number of valid elements in the buffer