33 const int8_t* data =
static_cast<const int8_t*
>(dataPtr);
35 auto bytesLeft =
size;
55 bytesLeft,
static_cast<int64_t
>(
mPageSize - page->WritePosition));
57 std::copy(data, data + toWrite, page->Data.begin() + page->WritePosition);
58 page->WritePosition += toWrite;
72 int8_t* dataPtr =
static_cast<int8_t*
>(data);
83 page->Data.begin() + page->ReadPosition,
84 page->Data.begin() + page->ReadPosition + toRead, dataPtr);
85 page->ReadPosition += toRead;
int64_t Write(const void *data, int64_t size)
int64_t Read(void *data, int64_t size)
int64_t GetAvailable() const
std::deque< Page * > mFreePages
std::queue< Page * > mActivePages
std::deque< Page > mAllocatedPages
void copy(const T *src, T *dst, int32_t n)