dimanche 20 décembre 2015

sqlite source code page_get

I can`t figure out why the second condition is pPager->pFirst==0, since the pFirst is a pointer to the first free page in the free list when the request page is not in the page cache. It's weird that if the first condition is failed that means the pager can not hold more pages. Then even the pFirst==0(there is no free page), it is no way to create a new page any more.

Below is a snapshot of the

 int sqlitepager_get(Pager *pPager, Pgno pgno, void **ppPage)

function which at the line 1311 in pager.c

The code fragment of sqlitepager_get() function, click me

And this is the source code.[click me]

Aucun commentaire:

Enregistrer un commentaire