Helper to maintain a memory budget for the write pages of a set of columns.
The memory manager keeps track of the sum of bytes used by the write pages of a set of columns. It will flush (and shrink) large pages of other columns on the attempt to expand a page.
Definition at line 212 of file RPageStorage.hxx.
Classes | |
struct | RColumnInfo |
Public Member Functions | |
RWritePageMemoryManager (std::size_t maxAllocatedBytes) | |
bool | TryUpdate (RColumn &column, std::size_t newWritePageSize) |
Try to register the new write page size for the given column. | |
Private Member Functions | |
bool | TryEvict (std::size_t targetAvailableSize, std::size_t pageSizeLimit) |
Flush columns in order of allocated write page size until the sum of all write page allocations leaves space for at least targetAvailableSize bytes. | |
Private Attributes | |
std::set< RColumnInfo, std::greater< RColumnInfo > > | fColumnsSortedByPageSize |
All columns that called ReservePage() (hence TryUpdate() ) at least once, sorted by their current write page size from large to small. | |
std::size_t | fCurrentAllocatedBytes = 0 |
Sum of all the write page sizes (their capacity) of the columns in fColumnsSortedByPageSize | |
std::size_t | fMaxAllocatedBytes = 0 |
Maximum allowed value for fCurrentAllocatedBytes , set from RNTupleWriteOptions::fPageBufferBudget. | |
#include <ROOT/RPageStorage.hxx>
|
inlineexplicit |
Definition at line 236 of file RPageStorage.hxx.
|
private |
Flush columns in order of allocated write page size until the sum of all write page allocations leaves space for at least targetAvailableSize bytes.
Only use columns with a write page size larger than pageSizeLimit.
Definition at line 582 of file RPageStorage.cxx.
bool ROOT::Experimental::Internal::RWritePageMemoryManager::TryUpdate | ( | RColumn & | column, |
std::size_t | newWritePageSize | ||
) |
Try to register the new write page size for the given column.
Flush large columns to make space, if necessary. If not enough space is available after all (sum of write pages would be larger than fMaxAllocatedBytes), return false.
Definition at line 616 of file RPageStorage.cxx.
|
private |
All columns that called ReservePage()
(hence TryUpdate()
) at least once, sorted by their current write page size from large to small.
Definition at line 228 of file RPageStorage.hxx.
|
private |
Sum of all the write page sizes (their capacity) of the columns in fColumnsSortedByPageSize
Definition at line 223 of file RPageStorage.hxx.
|
private |
Maximum allowed value for fCurrentAllocatedBytes
, set from RNTupleWriteOptions::fPageBufferBudget.
Definition at line 225 of file RPageStorage.hxx.