oops, it was an off-by-one error
This commit is contained in:
parent
59301745ef
commit
b8a23aa37a
1 changed files with 1 additions and 4 deletions
|
@ -112,7 +112,6 @@ void gather_metadata(Arena *arena, RMicroFileReader &reader, const RNTuple_File_
|
|||
last_inserted_pinfo->next = pinfo;
|
||||
} else for (Page_Info_Node *node = pinfo_head->next, *prev = pinfo_head; node; prev = node, node = node->next) {
|
||||
if (pinfo->range.end() <= node->range.start) {
|
||||
printf("inserted 0x%lX - 0x%lX (previous was 0x%lX - 0x%lX)\n", pinfo->range.start, pinfo->range.end(), last_inserted_pinfo->range.start, last_inserted_pinfo->range.end());
|
||||
prev->next = pinfo;
|
||||
pinfo->next = node;
|
||||
++n_slow;
|
||||
|
@ -158,14 +157,12 @@ void gather_metadata(Arena *arena, RMicroFileReader &reader, const RNTuple_File_
|
|||
// close current chunk and open new one
|
||||
Page_Info_Chunk *chunk = arena_push<Page_Info_Chunk>(arena);
|
||||
chunk->range.start = pinfo->range.start;
|
||||
chunk->first_group = n_groups;
|
||||
printf("closing chunk 0x%lX - 0x%lX, opening new at 0x%0lX\n", chunks_tail->range.start, chunks_tail->range.end(), pinfo->range.start);
|
||||
chunk->first_group = n_groups - 1;
|
||||
chunks_tail->next = chunk;
|
||||
chunks_tail = chunk;
|
||||
++n_chunks;
|
||||
}
|
||||
chunks_tail->range.len += pinfo->range.len;
|
||||
printf("adding page 0x%lX - 0x%lX to chunk 0x%lX - 0x%lX\n", pinfo->range.start, pinfo->range.end(), chunks_tail->range.start, chunks_tail->range.end());
|
||||
|
||||
if (idx++ % GROUP_SIZE != 0)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue