bam icon indicating copy to clipboard operation
bam copied to clipboard

What does `ctrl.ctrl->page_size * uints_per_page` mean?

Open WWWzq-01 opened this issue 9 months ago • 0 comments

Hi, I'm looking at this line of code from (https://github.com/ZaidQureshi/bam/blob/d20ef4ac5d4513a411422e41caf48562977504dc/include/page_cache.h#L775) and I'm trying to understand the meaning of ctrl.ctrl->page_size * uints_per_page in the following snippet:

        const uint32_t uints_per_page = ctrl.ctrl->page_size / sizeof(uint64_t);
        if ((pdt.page_size > (ctrl.ctrl->page_size * uints_per_page)) || (np == 0) || (pdt.page_size < ctrl.ns.lba_data_size))
            throw error(string("page_cache_t: Can't have such page size or number of pages"));

Could you please explain what this expression(ctrl.ctrl->page_size * uints_per_page) calculates ?Thank you!

WWWzq-01 avatar May 22 '24 14:05 WWWzq-01