Home | History | Annotate | Download | only in dist

Lines Matching refs:Lookaside

2808 ** the default size of lookaside memory on each [database connection].
2810 ** size of each lookaside buffer slot and the second is the number of
2812 ** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
2813 ** option to [sqlite3_db_config()] can be used to change the lookaside
2996 ** [lookaside memory allocator] configuration for the [database connection].
2998 ** pointer to a memory buffer to use for lookaside memory.
3001 ** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
3002 ** size of each lookaside buffer slot. ^The third argument is the number of
3007 ** rounded down to the next smaller multiple of 8. ^(The lookaside memory
3009 ** connection is not currently using lookaside memory, or in other words
3012 ** Any attempt to change the lookaside memory configuration when lookaside
4587 ** on this hint by avoiding the use of [lookaside memory] so as not to
4588 ** deplete the limited store of lookaside memory. Future versions of
8241 ** <dd>This parameter returns the number of lookaside memory slots currently
8246 ** satisfied using lookaside memory. Only the high-water value is meaningful;
8252 ** been satisfied using lookaside memory but failed due to the amount of
8253 ** memory requested being larger than the lookaside slot size.
8260 ** been satisfied using lookaside memory but failed due to all lookaside
8293 ** and lookaside memory used by all prepared statements associated with
13247 typedef struct Lookaside Lookaside;
15114 ** Lookaside malloc is a set of fixed-size buffers that can be used
15117 ** lookaside malloc provides a significant performance enhancement
15121 ** The Lookaside structure holds configuration information about the
15122 ** lookaside malloc subsystem. Each available memory allocation in
15123 ** the lookaside subsystem is stored on a linked list of LookasideSlot
15126 ** Lookaside allocations are only allowed for objects that are associated
15128 ** be stored in lookaside because in shared cache mode the schema information
15130 ** schema information, the Lookaside.bEnabled flag is cleared so that
15131 ** lookaside allocations are not used to construct the schema objects.
15133 struct Lookaside {
15134 u32 bDisable; /* Only operate the lookaside when zero */
15137 u32 nSlot; /* Number of lookaside slots allocated */
15290 Lookaside lookaside; /* Lookaside malloc configuration */
16853 u8 disableLookaside; /* Number of times lookaside has been disabled */
17116 sqlite3 *db; /* Optional database for lookaside. Can be NULL */
17158 int szLookaside; /* Default lookaside buffer size */
17159 int nLookaside; /* Default lookaside buffer count */
18265 ** it might have been allocated by lookaside, except the allocation was
18266 ** too large or lookaside was already full. It is important to verify
18267 ** that allocations that might have been satisfied by lookaside are not
18268 ** passed back to non-lookaside free() routines. Asserts such as the
18269 ** example above are placed on the non-lookaside free() routines to verify
18285 #define MEMTYPE_LOOKASIDE 0x02 /* Heap that might have been lookaside */
18496 ** The default lookaside-configuration, the format "SZ,N". SZ is the
18497 ** number of bytes in each lookaside slot (should be a multiple of 8)
18498 ** and N is the number of slots. The lookaside-configuration can be
19364 ** Count the number of slots of lookaside memory that are outstanding
19367 u32 nInit = countLookasideSlots(db->lookaside.pInit);
19368 u32 nFree = countLookasideSlots(db->lookaside.pFree);
19369 if( pHighwater ) *pHighwater = db->lookaside.nSlot - nInit;
19370 return db->lookaside.nSlot - (nInit+nFree);
19394 LookasideSlot *p = db->lookaside.pFree;
19397 p->pNext = db->lookaside.pInit;
19398 db->lookaside.pInit = db->lookaside.pFree;
19399 db->lookaside.pFree = 0;
19414 *pHighwater = db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT];
19416 db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT] = 0;
25408 ** TRUE if p is a lookaside memory allocation from db
25412 return SQLITE_WITHIN(p, db->lookaside.pStart, db->lookaside.pEnd);
25441 return db->lookaside.sz;
25493 memset(p, 0xaa, db->lookaside.sz);
25495 pBuf->pNext = db->lookaside.pFree;
25496 db->lookaside.pFree = pBuf;
25606 ** slower case when the allocation cannot be fulfilled using lookaside.
25614 (db->lookaside.bDisable==0) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
25619 ** Allocate memory, either lookaside (if possible) or heap.
25653 if( db->lookaside.bDisable==0 ){
25655 if( n>db->lookaside.sz ){
25656 db->lookaside.anStat[1]++;
25657 }else if( (pBuf = db->lookaside.pFree)!=0 ){
25658 db->lookaside.pFree = pBuf->pNext;
25659 db->lookaside.anStat[0]++;
25661 }else if( (pBuf = db->lookaside.pInit)!=0 ){
25662 db->lookaside.pInit = pBuf->pNext;
25663 db->lookaside.anStat[0]++;
25666 db->lookaside.anStat[2]++;
25693 if( isLookaside(db,p) && n<=db->lookaside.sz ) return p;
25704 memcpy(pNew, p, db->lookaside.sz);
25716 (db->lookaside.bDisable==0 ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
25794 ** temporarily disable the lookaside memory allocator and interrupt
25803 db->lookaside.bDisable++;
25818 assert( db->lookaside.bDisable>0 );
25819 db->lookaside.bDisable--;
26772 ** db: Pointer to a database connection. May be NULL. Lookaside
100542 assert( db->lookaside.bDisable );
100658 assert( db->lookaside.bDisable );
100748 db->lookaside.bDisable++;
100750 db->lookaside.bDisable--;
102212 ** contains lookaside memory. (Table objects in the schema do not use
102213 ** lookaside memory, but some ephemeral Table objects do.) Or the
102221 /* Record the number of outstanding lookaside allocations in schema Tables
102223 ** lookaside, this number should not change. */
102261 /* Verify that no lookaside memory was used by schema tables */
103838 db->lookaside.bDisable++;
103879 db->lookaside.bDisable--;
110088 ** the lookaside buffer belonging to database handle dbMem.
110704 /* Disable lookaside memory allocation */
110705 db->lookaside.bDisable++;
110726 /* Re-enable the lookaside buffer, if it was disabled earlier. */
110727 db->lookaside.bDisable--;
118279 assert( db->lookaside.bDisable >= pParse->disableLookaside );
118280 db->lookaside.bDisable -= pParse->disableLookaside;
118310 ** lookaside memory.
118314 db->lookaside.bDisable++;
120523 /* The sqlite3ResultSetOfSelect() is only used n contexts where lookaside
120525 assert( db->lookaside.bDisable );
138189 ** Disable lookaside memory allocation for objects that might be
138194 pParse->db->lookaside.bDisable++;
144015 ** Set up the lookaside buffers for a database connection.
144017 ** If lookaside is already active, return SQLITE_BUSY.
144019 ** The sz parameter is the number of bytes in each lookaside slot.
144021 ** space for the lookaside memory is obtained from sqlite3_malloc().
144023 ** the lookaside memory.
144032 /* Free any existing lookaside buffer for this handle before
144036 if( db->lookaside.bMalloced ){
144037 sqlite3_free(db->lookaside.pStart);
144039 /* The size of a lookaside slot after ROUNDDOWN8 needs to be larger
144056 db->lookaside.pStart = pStart;
144057 db->lookaside.pInit = 0;
144058 db->lookaside.pFree = 0;
144059 db->lookaside.sz = (u16)sz;
144064 db->lookaside.nSlot = cnt;
144067 p->pNext = db->lookaside.pInit;
144068 db->lookaside.pInit = p;
144071 db->lookaside.pEnd = p;
144072 db->lookaside.bDisable = 0;
144073 db->lookaside.bMalloced = pBuf==0 ?1:0;
144075 db->lookaside.pStart = db;
144076 db->lookaside.pEnd = db;
144077 db->lookaside.bDisable = 1;
144078 db->lookaside.bMalloced = 0;
144079 db->lookaside.nSlot = 0;
144601 if( db->lookaside.bMalloced ){
144602 sqlite3_free(db->lookaside.pStart);
146468 /* Enable the lookaside-malloc subsystem */
191418 ** buffer and buffer size to the lookaside-reader init function, zero