18 #include "trp_buffer.hpp"
27 TFPool::init(
size_t mem,
size_t page_sz)
29 unsigned char * ptr = (m_alloc_ptr = (
unsigned char*)malloc(mem));
30 for (
size_t i = 0;
i + page_sz < mem;
i += page_sz)
33 p->
m_size = (Uint16)(page_sz - offsetof(
TFPage, m_data));
48 TFBuffer::validate()
const
50 if (m_bytes_in_buffer == 0)
52 assert(m_head == m_tail);
86 assert(sum == m_bytes_in_buffer);