Home | History | Annotate | Download | only in orig

Lines Matching defs:lookaside

1733 ** memory allocation for the lookaside memory allocator on each
1735 ** size of each lookaside buffer slot and the second is the number of
1737 ** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
1738 ** verb to [sqlite3_db_config()] can be used to change the lookaside
1882 ** [lookaside memory allocator] configuration for the [database connection].
1884 ** pointer to a memory buffer to use for lookaside memory.
1887 ** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
1888 ** size of each lookaside buffer slot. ^The third argument is the number of
1893 ** rounded down to the next smaller multiple of 8. ^(The lookaside memory
1895 ** connection is not currently using lookaside memory, or in other words
1898 ** Any attempt to change the lookaside memory configuration when lookaside
6449 ** <dd>This parameter returns the number of lookaside memory slots currently
6454 ** satisfied using lookaside memory. Only the high-water value is meaningful;
6460 ** been satisfied using lookaside memory but failed due to the amount of
6461 ** memory requested being larger than the lookaside slot size.
6468 ** been satisfied using lookaside memory but failed due to all lookaside
6489 ** and lookaside memory used by all prepared statements associated with
8800 typedef struct Lookaside Lookaside;
10387 ** Lookaside malloc is a set of fixed-size buffers that can be used
10390 ** lookaside malloc provides a significant performance enhancement
10394 ** The Lookaside structure holds configuration information about the
10395 ** lookaside malloc subsystem. Each available memory allocation in
10396 ** the lookaside subsystem is stored on a linked list of LookasideSlot
10399 ** Lookaside allocations are only allowed for objects that are associated
10401 ** be stored in lookaside because in shared cache mode the schema information
10403 ** schema information, the Lookaside.bEnabled flag is cleared so that
10404 ** lookaside allocations are not used to construct the schema objects.
10406 struct Lookaside {
10408 u8 bEnabled; /* False to disable new lookaside allocations */
10495 Lookaside lookaside; /* Lookaside malloc configuration */
12152 sqlite3 *db; /* Optional database for lookaside. Can be NULL */
12188 int szLookaside; /* Default lookaside buffer size */
12189 int nLookaside; /* Default lookaside buffer count */
13157 ** it might have been allocated by lookaside, except the allocation was
13158 ** too large or lookaside was already full. It is important to verify
13159 ** that allocations that might have been satisfied by lookaside are not
13160 ** passed back to non-lookaside free() routines. Asserts such as the
13161 ** example above are placed on the non-lookaside free() routines to verify
13177 #define MEMTYPE_LOOKASIDE 0x02 /* Might have been lookaside memory */
14441 *pCurrent = db->lookaside.nOut;
14442 *pHighwater = db->lookaside.mxOut;
14444 db->lookaside.mxOut = db->lookaside.nOut;
14458 *pHighwater = db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT];
14460 db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT] = 0;
20175 ** TRUE if p is a lookaside memory allocation from db
20179 return p>=db->lookaside.pStart && p<db->lookaside.pEnd;
20198 return db->lookaside.sz;
20241 memset(p, 0xaa, db->lookaside.sz);
20243 pBuf->pNext = db->lookaside.pFree;
20244 db->lookaside.pFree = pBuf;
20245 db->lookaside.nOut--;
20370 if( db->lookaside.bEnabled ){
20371 if( n>db->lookaside.sz ){
20372 db->lookaside.anStat[1]++;
20373 }else if( (pBuf = db->lookaside.pFree)==0 ){
20374 db->lookaside.anStat[2]++;
20376 db->lookaside.pFree = pBuf->pNext;
20377 db->lookaside.nOut++;
20378 db->lookaside.anStat[0]++;
20379 if( db->lookaside.nOut>db->lookaside.mxOut ){
20380 db->lookaside.mxOut = db->lookaside.nOut;
20396 ((db && db->lookaside
20413 if( n<=db->lookaside.sz ){
20418 memcpy(pNew, p, db->lookaside.sz);
20431 (db->lookaside.bEnabled ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
85052 assert( db->lookaside.bEnabled==0 );
85166 assert( db->lookaside.bEnabled==0 );
85248 int lookasideEnabled = db->lookaside.bEnabled;
85249 db->lookaside.bEnabled = 0;
85251 db->lookaside.bEnabled = lookasideEnabled;
86647 ** contains lookaside memory. (Table objects in the schema do not use
86648 ** lookaside memory, but some ephemeral Table objects do.) Or the
86654 TESTONLY( int nLookaside; ) /* Used to verify lookaside not used for schema */
86662 /* Record the number of outstanding lookaside allocations in schema Tables
86664 ** lookaside, this number should not change. */
86666 db->lookaside.nOut : 0 );
86700 /* Verify that no lookaside memory was used by schema tables */
86701 assert( nLookaside==0 || nLookaside==db->lookaside.nOut );
88201 u8 enableLookaside = db->lookaside.bEnabled;
88205 db->lookaside.bEnabled = 0;
88214 db->lookaside.bEnabled = enableLookaside;
94092 ** the lookaside buffer belonging to database handle dbMem.
94544 u8 enableLookaside; /* Copy of db->lookaside.bEnabled */
94652 /* Disable lookaside memory allocation */
94653 enableLookaside = db->lookaside.bEnabled;
94654 db->lookaside.bEnabled = 0;
94676 /* Re-enable the lookaside buffer, if it was disabled earlier. */
94677 db->lookaside.bEnabled = enableLookaside;
103131 /* The sqlite3ResultSetOfSelect() is only used n contexts where lookaside
103133 assert( db->lookaside.bEnabled==0 );
119577 pParse->db->lookaside.bEnabled = 0;
120654 pParse->db->lookaside.bEnabled = 0;
121654 u8 enableLookaside; /* Saved value of db->lookaside.bEnabled */
121677 enableLookaside = db->lookaside.bEnabled;
121678 if( db->lookaside.pStart ) db->lookaside.bEnabled = 1;
121732 db->lookaside.bEnabled = enableLookaside;
122690 ** Set up the lookaside buffers for a database connection.
122692 ** If lookaside is already active, return SQLITE_BUSY.
122694 ** The sz parameter is the number of bytes in each lookaside slot.
122696 ** space for the lookaside memory is obtained from sqlite3_malloc().
122698 ** the lookaside memory.
122702 if( db->lookaside.nOut ){
122705 /* Free any existing lookaside buffer for this handle before
122709 if( db->lookaside.bMalloced ){
122710 sqlite3_free(db->lookaside.pStart);
122712 /* The size of a lookaside slot after ROUNDDOWN8 needs to be larger
122729 db->lookaside.pStart = pStart;
122730 db->lookaside.pFree = 0;
122731 db->lookaside.sz = (u16)sz;
122738 p->pNext = db->lookaside.pFree;
122739 db->lookaside.pFree = p;
122742 db->lookaside.pEnd = p;
122743 db->lookaside.bEnabled = 1;
122744 db->lookaside.bMalloced = pBuf==0 ?1:0;
122746 db->lookaside.pStart = db;
122747 db->lookaside.pEnd = db;
122748 db->lookaside.bEnabled = 0;
122749 db->lookaside.bMalloced = 0;
123163 assert( db->lookaside.nOut==0 ); /* Fails on a lookaside memory leak */
123164 if( db->lookaside.bMalloced ){
123165 sqlite3_free(db->lookaside.pStart);
124802 /* Enable the lookaside-malloc subsystem */