A thread-safe cache of column pages.
RPage GetPage(RColumn *column, NTupleSize_t index)
Tries to find the page corresponding to column and index in the cache.
std::vector< std::uint32_t > fReferences
void ReleasePage(const RPage &page)
Give back a page to the pool. There must not be any pointers anymore into this page.
RPagePool & operator=(const RPagePool &)=delete
RPagePool(const RPagePool &)=delete
std::vector< RPage > fPages
TODO(jblomer): should be an efficient index structure that allows.
RPagePool(std::size_t pageSize, std::size_t nPages)
RPage ReservePage(RColumn *column)
Get a new, empty page from the cache. Return a "null Page" if there is no more free space.
void CommitPage(const RPage &page)
Registers a page that has previously been acquired by ReservePage() and was meanwhile filled with con...
A page is a fixed size slice of a column that is mapped into memory.