MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / prefetch_init

Function prefetch_init

src/jrd/cch.cpp:4460–4482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4458
4459
4460static void prefetch_init(Prefetch* prefetch, thread_db* tdbb)
4461{
4462/**************************************
4463 *
4464 * p r e f e t c h _ i n i t
4465 *
4466 **************************************
4467 *
4468 * Functional description
4469 * Initialize prefetch data structure.
4470 * Most systems that allow access to "raw" I/O
4471 * interfaces want the buffer address aligned.
4472 *
4473 **************************************/
4474 Database* dbb = tdbb->getDatabase();
4475
4476 prefetch->prf_tdbb = tdbb;
4477 prefetch->prf_flags = 0;
4478 prefetch->prf_max_prefetch = PREFETCH_MAX_TRANSFER / dbb->dbb_page_size;
4479 prefetch->prf_aligned_buffer =
4480 (SCHAR*) (((U_IPTR) &prefetch->prf_unaligned_buffer + MIN_PAGE_SIZE - 1) &
4481 ~((U_IPTR) MIN_PAGE_SIZE - 1));
4482}
4483
4484
4485static void prefetch_io(Prefetch* prefetch, FbStatusVector* status_vector)

Callers 3

CCH_prefetchFunction · 0.85
cache_readerMethod · 0.85
cache_writerMethod · 0.85

Calls 1

getDatabaseMethod · 0.80

Tested by

no test coverage detected