コード例 #1
0
 private static void sqlite3PCacheBufferSetup(object pBuf, int sz, int n)
 {
     if (pcache1 != null)
     {
         sz                     = SysEx.ROUNDDOWN8(sz);
         pcache1.szSlot         = sz;
         pcache1.nSlot          = pcache1.nFreeSlot = n;
         pcache1.nReserve       = n > 90 ? 10 : (n / 10 + 1);
         pcache1.pStart         = null;
         pcache1.pEnd           = null;
         pcache1.pFree          = null;
         pcache1.bUnderPressure = false;
         PgFreeslot p;
         while (n-- > 0)
         {
             p             = new PgFreeslot();
             p._PgHdr      = new PgHdr();
             p.pNext       = pcache1.pFree;
             pcache1.pFree = p;
         }
         pcache1.pEnd = pBuf;
     }
 }